[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: marking up text when term from other file is found
On Thu, Apr 22, 2010 at 5:24 PM, Wolfgang Laun <wolfgang.laun@xxxxxxxxx> wrote: > C1: B The pattern containing all terms can be constructed once and not > repeatedly within the template doing the analyze-string. I agree. Thanks for the observation. So, I propose following changes to the stylesheet: 1) Have a global variable as following, <xsl:variable name="term-regex" select="string-join(for $term in $index-terms/terms/term return concat('(', $term, ')'), '|')" /> 2) and change, the 'analyze-string' instruction to following, <xsl:analyze-string select="." regex="{$term-regex}"> ... > C2: B The flags attribute of analyze-string should be used to do a case > insensitive match: flags='i' I agree :) -- Regards, Mukul Gandhi
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|