Re: [greenstone-users] How to use /gsdlmod?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-help-Jonathan+Pattison--00-0-1-00-0--4----0-0-11-10-0utfZz-8-00&a=q and ifl argument in format DocumentText

From ruben pandolfi
DateFri, 04 Aug 2006 19:54:16 +0200
Subject Re: [greenstone-users] How to use /gsdlmod?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-help-Jonathan+Pattison--00-0-1-00-0--4----0-0-11-10-0utfZz-8-00&a=q and ifl argument in format DocumentText
In-Reply-To (44D26ACB-1030305-cs-waikato-ac-nz)
Thank you Michael,

Michael Dewsnip ha scritto:

> /gsdlmod?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-help-Jonathan+Pattison--00-0-1-00-0--4----0-0-11-10-0utfZz-8-00&a=q&q=[dc.ModsRecordInfoRecordIdentifi]
> instead of
> /gsdlmod?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-help-Jonathan+Pattison--00-0-1-00-0--4----0-0-11-10-0utfZz-8-00&a=q=[dc.ModsRecordInfoRecordIdentifi]
>> 2) I would like to add ifl argument to go directly to the first record
>> found , is this possible from format DocumentText?
> The "&ifl=1" is an argument to the query action, so it can go into an
> "/gsdlmod?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-help-Jonathan+Pattison--00-0-1-00-0--4----0-0-11-10-0utfZz-8-00&a=q" link.

I almost resolved the query problem, but still can not get &ifl=1 to
work. It looks OK , since I do not have errors, but simply output the
search result and does not go to record directly.

This is what I have:

{If}{[dc.ModsExtensionHasTranslation^a], <tr><td
valign=top><b>_Ht_:</b></td><td valign=top>

dc.ModsExtensionHasTranslation^z contains ISBN unique identifier, and I
make a simple search in the ISBN index. It works and give me the only
possible result, but I would like to skip the search page and go
directly to the document. &ifl=1 should be the perfect argument to do
so, but is not ... you might have a try here:

that gives me the same output as:

2) I have some fields that have repeatable pairs of values, and I have
worked it out like this:

{If}{[sibling(2):dc.ModsExtensionHasTranslation^a], <tr><td
valign=top></td><td valign=top>
{If}{[sibling(3):dc.ModsExtensionHasTranslation^a], <tr><td
valign=top></td><td valign=top>

It is a solutions, but surely not the best, since I can not determine
how many times the field repeat, and the code is a bit bloated ...

I've seen the Axel Schild method here:

and I might need something similar. I have tried implementing it but
without success, since my javascript is quite poor.

I have copied the code in format DocumentText and I have just inserted
this in my file:

package Style

### Self-made Javascript functions
function ExtractAuthors() {
var res;
a = AuthorField.outerText.split(";");
resolver = a[0]+"&q=";
b = a[1].split("+%3b+");
c = a[2].split("_");
res = "";
for (i = 0; i < b.length ;i++)
res = res + "<a href=" + resolver + b[i]+ "&h=dd0&t=0>" +
c[i] + "</a><br/>";
AuthorField.outerHTML = res;


But it does not work.

I do not really understand what I'm doing, but I just took a javascript
manual and get back in two days :-) !

My idea is to write a generic function, put it in an external javascript
file and use it for everytime I have a repeatable metadata that need to
be linked.

Meanwhile, if you can give some help, I would appreciate,....

> Was it this collection:

It was, thanks again!