[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Remove text Up to Full Stop
> This is slightly off-topic, but does anyone know why there is no > string function in XSL that does what the "last-index-of" Java String > function does? xslt (1) has essentially no functions for parsing strings (up-translation in omnimark-speak) it's world view is that input data is fully tagged and all information in the source is marked up with xml eleemnts and attributes and the job is to down-size that input for later consumption. It does have substring, substring-before and substring-after but they aren't really up to the job (although I did once write a fairly full tex maths parser including matching brace groups {... {...}} just using that, but it was fairly painful.) The usage of XSLT doesn't really fit the world view of that original design, and xslt2 does have a lort more functionality in this area including regular-expression-replace, which does the job in a single function call in this case. > A recursive function seems rather > slow for this kind of (common) operation. It's just syntax. If an idiom is used often enough, there's no saying what run-time code results (or how long it takes) once the compiler optimiser has finished jiggling the code. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|