Re: [greenstone-users] Referencing to other documents

From Katherine Don
DateMon, 15 Sep 2003 14:31:49 -0600
Subject Re: [greenstone-users] Referencing to other documents
In-Reply-To (152223786477-20030904135908-gmx-de)
hi ben

sorry about the lateness of the reply. Here's a couple of suggestions if
you haven't already figured something out.

1. make a link to a search that gives all the related docs:

I would use a link like
<a
href="/cgi-bin/library?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-preferences-Kevin Ollivier--00-0-21-00-0-0-11----0-0-&a=q&fqv=[CitedReferences]&fqf=ET,ET,ET,ET,ET,ET,ET"></a>

like you suggested below. But you need to modify the BibTex plugin to format the cited references: if you make them a comma separated list rather than a space separated list, then this should work.

actually it will only work with simple form searching, so its probably good to add qt=1&qf=0 to the arguments.
this will make the query page simple form query which is not so good if the user has changed their preferences to use a different query type, but at least it will work.

2. make individual links to each related document
An alternative solution is to use the bibtex keys as greenstone identifiers, rather than using the default HASHids. -> change the set_OID function to add the EntryID metadata as the Identifier, rather than the section numbers.
Then you can make links to the related documents, using the ids in the cited refs field as doc ids.

the easiest way to make several links to all the matching documents is to create the html fragment in the plugin and add it as metadata, so then you can put [RelatedLinks] or whatever in the format statement.

eg in the plugin turn "A001 B023 C054" etc into

"Related documents:<a href="/cgi-bin/library?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-preferences-Kevin Ollivier--00-0-21-00-0-0-11----0-0-&a=d&d=A001">doc 1</a>, <a href="/cgi-bin/library?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-preferences-Kevin Ollivier--00-0-21-00-0-0-11----0-0-&a=d&d=B023">doc 2</a>.."


or something like that.
This may not be so useful cos at the time you are creating this html, you dont have easy access to any info about the related docs, eg title, so to make the link text ('doc 1' and 'doc 2' in the above example) have something useful in it, you may need to do extra work.
so perhaps the first suggestion is the easiest.

I hope I haven't confused you and that this is useful

cheers
Katherine Don


Ben Liesfeld wrote:

>Hi all,
>
> I'd like to create links between single records in a collection.
>
> The idea is: I have a bibliography collection where one field
> contains "Cited References" (the possible entries in this field are
> unique bibtex keys, number not limited). So it would be nice if I
> could make one bibliography record display links to other records
> included in the collection.
>
> My first thought was to just generate a link executing a search in
> the field "EntryID" (where the original bibtex key was imported to
> by a modified BibTexPlug.pm).
> But, the single entries in this field are separated by spaces and GS
> generally treats spaces as AND. MGPP never accepts boolean operators
> other than AND in field searches (within the same field). So if I
> have e. g. "Alfven1932 Bell1980 Hain2002 ..." in one record in the
> field "Cited References" - how do I generate a link to the search
> "(Alfven1932 OR Bell1980 OR Hain2002) IN BibtexKey"?
>
> Unfortunately, providing a link like
> ".../cgi-bin/library?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-preferences-Kevin Ollivier--00-0-21-00-0-0-11----0-0-&a=q&fqv=[CitedReferences]&fqf=ET,ET,ET,ET,ET,ET,ET"
> hoping that the number of cited references never exceeds 7 doesn't
> work (only when entered directly into the browser).
>
> ".../cgi-bin/library?e=d-00000-00---off-0gsarch--00-0----0-10-0---0---0direct-10---4-----dfr--0-1l--11-en-50---20-preferences-Kevin Ollivier--00-0-21-00-0-0-11----0-0-&a=q&fqv=[CitedReferences]&fqf=ET"
> only works when the entry contains one reference.
>
> Any hints, any suggestions would be very much appreciated.
>
>
>