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

From schild
DateWed, 17 Aug 2005 17:41:52 +0200
Subject Re: [greenstone-users] Displaying multiple metadata valuesindividually?
In-Reply-To (43035388-40101-gmx-net)
Hi Jens,

thanks for the comment. You are right, the outhtml only works for IExplorer such that in my latest versions of the javascripts I changed them to also work with mozilla. I think I already posted this solution a while ago on the list ("Re: [greenstone-users] Referencing & querying the search engine", 27.06.2005). Chaitra, you might want to consult this posting. When I find the time in the near future, I will update the documentation for the javascripts.

However Jens I must say I disagree with your comment that this is only an "undesirable hack". Sure there are probably better solutions from a computer scientist point of view but that is what I can claim for my solution: It works fine for me (never caused me any trouble at least), and leaves a lot of flexibility for specific (personal) needs.
I think that you could implement this feature in C++ and coping for the requirements of all users (different search engines, different index names, etc, some people would want to search for a combination of metadata values, etc) but I think it won't come for without a larger effort (and will be most likely not generic). But if somebody feels up to adapting the C++ code I will be grateful as well...

Greetings,

Axel Schild

jens wille wrote:
hi chaitra & all!

Chaitra Rao wrote:
  
After I built the collection, I can see the long url but no
hyperlink, which I guess the javascript is supposed to generate.
    
which browser are you using? i had the same problem with mozilla and
rewrote the javascript to work in mozilla - but now it doesn't work
in opera (don't know how about msie).

in axel's script it's caused by the outerHTML property that is not
supported by mozilla (according to [1]). in my script it must be
something else :-(

[1] <http://www.quirksmode.org/dom/w3c_html.html> (scroll down to
"outerHTML")

besides, i like to consider this javascript solution an undesirable
hack - it'd be much better to use the [sibling:...] syntax or
something like that, i just don't know how.

this, however, made me switch to providing specially formatted
metadata instead:

<Metadata name="foo" mode="accumulate">something</Metadata>
<Metadata name="bar" mode="accumulate">anything</Metadata>
<Metadata name="foobar"
mode="accumulate">_myhref_(something,anything)</Metadata>

with the macro _myhref_ being: {<a href="_1_">_2_</a>}
(so it can be altered later)

now i can print the hyperlinked metadata: [sibling(All:'<br>'):foobar]

but this is nothing else than just another hack, and only applicable
if you create/postprocess your metadata through some script.
(note also that [foo] and [bar] must not contain commas!)

to sum things up: i think this problem is only to be satisfactorily
solved by tackling the c++ code. so if anybody dares to... it would
be gratefully appreciated (at least by me ;-).

cheers
jens

_______________________________________________
greenstone-users mailing list
greenstone-users@list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
  


-- 
----------------------------------------------

Dipl.-Ing. Axel Schild
Automatisierungstechnik und Prozessinformatik
Ruhr-Universitaet Bochum IC-3/140
D-44780 Bochum, Germany

Tel: +49 234 32 25203
Fax: +49 234 32 14101
E-mail: schild@atp.rub.de