|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Xslt 2 stripping out non-numbers
> This is the "double-translate" technique first proposed on this list > (to the best of my knowledge) by Mike Kay. > > The FXSL template/function > > str-filter > > has been shown to perform better than the double-translate technique > on large strings: > > http://www.biglist.com/lists/xsl-list/archives/200203/msg01524.html > > I suspect most implementations of translate() are likely to be optimized for a fairly short second argument (the set of characters to be replaced) and are likely to have performance proportional to length(arg1)*length(arg2). Where that's the case, the double-translate trick applied to a large input string is quite likely to generate a call on translate with long values for both arg1 and arg2 which could obviously be rather inefficient. Using replace() in XPath 2.0 is likely to perform much better in these circumstances. Michael Kay http://www.saxonica.com/
|
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








