On Thu, 7 Apr 2011 14:52:23 -0700
Tony Nassar <tnassar(_at_)palantir(_dot_)com> wrote:
Is there any reason to use a regex for *static* keywords from the
shorter list? Wouldn't you simply hash that using xsl:key, then use
the key() function to determine whether regex-group(1) is a key?
I need to avoid marking up the word followed by other content.
Hence the need to use regex
Presumably you'd lower-case everything, etc. In fact, putting all the
keywords in a regex is likely to work badly. I don't know if a regex
engine is going to optimize an "or" with 300 words in it...it's
probably going to assume that you wouldn't be using a regex to check
for equality with 1 of 300 words!
Which is why I hadn't considered that approach.
--
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--