[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Regular expression functions (Was: Re: comments on
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 expression: ([0-9]{2}) (\w+), ([0-9]{4}) and use the results of the subexpression matches to give you the date, month and year. 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
|