|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: variables/parameters in match of xsl:key, 'ends-wi
Hi Daniel, > As a side note. I sure wish there was an "ends-with" string function in > addition to the "starts-with" function. I seem to need it much more often > than "starts-with". I'm imitating "ends-with(source, find)" with > > find = substring(source, 1 + string-length(source) - string-length(find)) > > But for input of several MB., it takes a bit of a hit that it wouldn't if > there was an 'ends-with' function! (yes, I timed the above with a comparable > "contains" and "starts-with" variant). Does anyone have a faster way to > imitate "ends-with"? Hmm... I wonder if: contains(source, find) and not(substring-after(source, find)) would be any faster? Which way round the two tests should go (contains first or substring-after first) probably depends on the XML source - you might try both. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








