F
Federico
Hi all,
I have some texts codifed in XML and I'implementing eXist
(http://exist.sourceforge.net) for textual researches.
The XML file I obtain after the query from eXist, highlight the word
searched with the tag <exist:match>
So the situation is (if we have searched for the word "ago" for
example)
<p>Call me Ishmael. Some years <exist:match>ago</exist:match> -- never
mind how long precisely -- having little or no money....</p>
I should be able to select a prefixed number of words (four for
example) before and after the <exist:match>, so that the result should
be:
<p>me Ishmael. Some years <exist:match>ago</exist:match> -- never mind
how long</p>
Now I can apply an XSL Stylesheet to present this result in HTML.
But How can I select backwards the prefixed number of words before the
<exist:match> tag and forwards the words after the tag, eliminating
all the others?.
Is it possible using XSLT or should I use SAX?
Thank you
Federico
I have some texts codifed in XML and I'implementing eXist
(http://exist.sourceforge.net) for textual researches.
The XML file I obtain after the query from eXist, highlight the word
searched with the tag <exist:match>
So the situation is (if we have searched for the word "ago" for
example)
<p>Call me Ishmael. Some years <exist:match>ago</exist:match> -- never
mind how long precisely -- having little or no money....</p>
I should be able to select a prefixed number of words (four for
example) before and after the <exist:match>, so that the result should
be:
<p>me Ishmael. Some years <exist:match>ago</exist:match> -- never mind
how long</p>
Now I can apply an XSL Stylesheet to present this result in HTML.
But How can I select backwards the prefixed number of words before the
<exist:match> tag and forwards the words after the tag, eliminating
all the others?.
Is it possible using XSLT or should I use SAX?
Thank you
Federico