"Andreas W. Wylach" <firstname.lastname@example.org> wrote in message
> Hi everybody,
> I am about implementing a little search engine that searches a phrase
> over xml text nodes. I got
> that all working fine but what I want as the results is not the
> complete text of the textnode,
> I would like to make an abstract like result list (such output that
> you get with google searches.
> For eg
> ... I am the <b>substring</b> from a complete text node ...
> where "substring" is the search term.
> The problem is simple (I think): I want to extract all the text parts
> of the complete text node,
> where search searchterm is highlighted, surrounded by the text like
FXSL gives you exactly that (look for testConcordance.xsl).
As first shown here a year and a half ago:
this was used to create a concordance of the text of the New Testament for
any word longer than three characters with frequency count in the document
not exceeding a given frequency count parameter (1280, which practically
leaves out mainly pronouns).
The code itself is 95 lines and on a 3GHz, 2GB Pentium IV PC with Saxon 8.6
(at that time) needed less than 92 seconds to produce the complete (huge)
concordance. The source xml document: "ot Ending Spaces.xml" is almost 50
000 (fifty thousand) lines long.
This is just one illustration of the reality of what can be done with XSLT,
disspelling the myths of "XSLT cannot do this or that
Hope this helped.