|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Tokenize followed by compare or satisfies using c
On Fri, Sep 02, 2016 at 09:38:07PM -0000, Eliot Kimber ekimber@xxxxxxxxxxxx scripsit: > In the specific DITA case you're searching for strings reliably bound by > blanks, so the contains is correct in this case. > > Your statement "Intrinsically, tokenizing is more complex than just > searching for a substring." is I think what I was looking for--that > suggests that as a general policy that preferring contains() over tokenize > and sequence comparison will be the better choice if performance is the > only concern (and assuming that it actually produces a meaningful > performance difference, which it very well may not). If you're seriously concerned about performance, generate a list of the known @class values, stick it in an XML structure in a variable, and use key() to look stuff up in it. That risks requiring regularizing the @class spaces first but it also means you only have to worry about decomposing the @class when it's an unknown value and the fallback is required. -- Graydon
|
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
|

Cart








