Re: [greenstone-users] Displaying multiple metadata valuesindividually?

From jens wille
DateThu, 18 Aug 2005 11:48:58 +0200
Subject Re: [greenstone-users] Displaying multiple metadata valuesindividually?
In-Reply-To (43044CBF-5000405-atp-rub-de)
schild wrote:
> I guess now we found a common basis for the discussion :-). I
> think the header of the mails for the discussion might be
> misleading. It should probably include something like "dynamic
> generation of query links from metadata with multiple values" (at
> least I think that is what Chaitra was trying to implement in her
> collection)...
hm, i'm not sure if that hits your intentions. isn't what you want a
bit more sophisticated? in chaitra's case (or mine, for that matter)
it can be accomplished by just printing something out, yours on the
other hand would involve dynamic form processing ("dynamic" here as
linked to some user action).

your intentions seem to depend on greenstone's ability to handle
search requests. if greenstone were able to process a query with
multiple arguments it might look different, e.g. "fqv=foo&fqv=bar"
instead of just "fqv=foo,bar", then you could just provide your
arguments in "natural" order (fqv=term1&fqc=op1&fqv=term2&fqc=op2;
...) and didn't need to build the query string yourself.

or am i missing some point again? ;-) (apart from the fact, that it
might not be trivial to make greenstone act this way...)

> To conclude I think that "For" loop statements for handling
> metadata could be a very nifty feature of greenstone in the
> future...
well, that's true! :-) but actually what i suggested wouldn't just
turn out to be a simple for-loop (in terms of what i know from, say,
perl), it's rather an intertwined double-loop kind of thing. in perl
it might look like:

my ($i, $m, $n) = (-1, scalar <first list>, scalar <list>);
while (++$i < $m) {
my $j = -1;
while (++$j < $n) {
print <item $i of list $j>;
}
}

(in prolog this might be a lot easier ;-)

cheers
jens