Altova Mailing List Archives

RE: [xsl] Search highlighting using xslt 2.0

From: "Andrew Welch" <AWelch@--------------->
Date: 3/24/2004 6:08:00 AM
> Yes. Use Lucene (if I remember correctly, you are a java guy).

Thanks Rob.  I will have at better look at Lucene and see what its
capable of.

The indexing and search results for the system Im working on is already
complete, we just have a few issues with the term highlighting.  Certain
parts of the result xhtml shouldn't be included in the highlighting, for

I render tables with static headers by rendering a table, then repeating
the table header and moving it up to give the appearance the table
header is fixed.

    <td>this is the header</td>
    <td>this is the body</td>

    <td>this is the header</td>

Notice the table's header is repeated in a separate table.  If the first
table is scrolled, its header will scroll with it.  By moving the second
table up using dhtml expressions, I can give the impression that the
table header is static (the code is rather nice, if anybody's

This means there are effectively two copies of the same information.  We
currently use special delimiters to tell our search highlighting code
not to include the first table's header in the highlighting regex, but I
would like to use the markup instead.  Can Lucene handle this (I will

If I did the highlighting using xslt, I would have control over which
parts of the xhtml I wanted to apply the highlighting to.  I'm just
wondering if the new features in 2.0 make this sort of thing feasible...


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.