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

Re: Any likely prospect of lookahead/ lookbehind regex

Subject: Re: Any likely prospect of lookahead/ lookbehind regex support in future XPath/XSLT?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 May 2014 18:01:13 -0000
Re:  Any likely prospect of lookahead/ lookbehind regex
It does no harm to ask. Raise the request as a formal comment on the XPath 3.1

I don't think anyone will object on principle, provided that the extension is
well-defined in terms of Unicode, easy to specify, and widely available in
regex libraries. They may object on the grounds of resources and timescales.

Michael Kay

On 16 May 2014, at 17:26, David Sewell dsewell@xxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> 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
> --
> 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.