You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ao...@student.cs.ucc.ie on 2008/08/17 08:40:47 UTC

Adding an XLink? Search Result matching section

Hi All!

I'm using Lucene to return search results from an index of TEI XML docs.

Since the docs are quite large, I want the user to be taken to the
particular part of the document containing the match.

So far, I have managed to return a 'section_id' which represents the
matching part of the source doc.

This identifier can be translated into an XPath expression for the
particular section of the source document.

The question is, how do I now add an link (XLink?) to the source doc so
that I can use the section_id to bring the user to the correct part of the
doc?

I'm very new to Cocoon and intend on using v2.2. I'm thinking the solution
will be something like the following:

1. Pass query string along with each search result representing the
matching section (section_id).

2. Convert the query string into an XPath expression to locate the section
in the source doc.

3. Append a node to the source doc in the appropriate place, representing
an XLink.

4. Translate the document into the chosen presentation format including
the equivalent of a link in that format e.g. HTML -> Anchor #.

I would be grateful of any pointers (pardon the pun!) on this,

Thanks,

Aodh Ó Lionáird.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org