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

Any likely prospect of lookahead/ lookbehind regex su

Subject: Any likely prospect of lookahead/ lookbehind regex support in future XPath/XSLT?
From: "David Sewell dsewell@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 May 2014 16:26:03 -0000
 Any likely prospect of lookahead/ lookbehind regex  su
I'm guessing that the answer is going to be "no", but am just wondering whether there has been discussion of extending the standard regular expression support in XPath to include lookahead and lookbehind assertions (both positive and negative). I'm also guessing that this could be more than a little tricky for implementors.

Every now and then I find cases where replacement or xsl:analyze-string are made hugely easier by availability of those features. For example, at the moment I'm doing a transform to convert text like

VIII, 9, 150 n. 4, 179-80 and n. 3

into something like

<num value="8">VIII</num>, <num n="pg">9</num>, <num n="pg">150</num> n. 4, <num n="pg">179-80</num> and n. 3

so that I can create links to the pages and page ranges. It's a lot more straightforward to do via xsl:analyze-string when I can use a negative lookbehind assertion to ignore numerals preceded by "n. ".

I appreciate the ability to do this in Saxon via an (unsupported) extension, but having it part of the standard would mean less worry about whether code that works now might not work later.


David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 400314, Charlottesville, VA 22904-4314 USA
Email: dsewell@xxxxxxxxxxxx   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/

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.