[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Remove text Up to Full Stop

Subject: Re: Remove text Up to Full Stop
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 22 Aug 2005 11:28:19 +0100
regexp code for 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
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.