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

Re: Regular expression functions (Was: Re: comments on

Subject: Re: Regular expression functions (Was: Re: comments on Dece mber F&O draft)
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 11 Jan 2002 16:36:07 +0000
regular expression date
Hi Peter,

> I'm sort of barely able to keep up with it. I comfortable with both
> regexp and XSLT but I've never tried to marry the two. I guess my
> vision of regexp in XSLT is as a way of selecting nodes and not as a
> way of selecting strings. As such, I don't expect a way of tracking
> or naming substrings. If I want to manipulate substrings of the
> output document, then I'd expect to do that after the XSLT was done
> it's work, using the serialized output?

The kind of use case I see for getting the results of the match is if
you have a date in a nice localised format:

  <date>11th January, 2002</date>

and you wanted to convert this into an xs:date (2002-01-11).

Now you could do that with a lot of fiddly string manipulation
functions, but it would be a lot easier to create a regular

  ([0-9]{2}) (\w+), ([0-9]{4})

and use the results of the subexpression matches to give you the date,
month and year.



Jeni Tennison

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.