Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Replace hithighlight tags >Thread Next - Re: Replace hithighlight tags Re: Replace hithighlight tagsTo: NULL Date: 10/8/2005 10:40:00 AM > I'm transforming this document to html to display in a browser. Maybe I've missed the point, but I think this should not be that hard with XSLT: > <xsl:apply-templates select="/result/document/fulltext" > mode="search-results-with-highlight" /> Just apply without modes ... ---8<---8<--- <xsl:apply-templates select="/result/document/fulltext"/> ---8<---8<--- > <xsl:template match="searchhit" mode="search-results-with-highlight" > > <span style="background: red; padding: 0.125em 0.5em;"> > <xsl:apply-templates mode="search-results-with-highlight" /></span> > </xsl:template> ... and wrap <searchhit> with <span> ... ---8<---8<--- <xsl:template match="searchhit"> <span style="background: red; padding: 0.125em 0.5em;"> <xsl:apply-templates/> </span> </xsl:template> ---8<---8<--- -- Ixa | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
