|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Any discussion of more Perl-like regex capability in XPath 2.1?David Sewell dsewell at virginia.eduThu May 20 14:26:30 PDT 2010
So far as I can see in the working draft of "XPath and XQuery Functions
and Operators 1.1", the only real extension to regular expressions is
the addition of a "q" flag in matches to block metacharacter
interpretation:
http://www.w3.org/TR/xpath-functions-11/#flags
I'm just curious whether there has been discussion of adding any more
Perl-like expressivity to XPath regular expressions. For example, being
able to use the escape sequences \u, \l, etc. in replacement patterns
would allow concision that is currently not legal:
let $s := "from George Washington, 17 May 1789"
return replace($s, '^(.+),.*', '\u$1') (: ILLEGAL :)
==> "From George Washington"
instead of the verbosity required currently to do the same thing:
let $s := "from George Washington, 17 May 1789"
return concat(
upper-case(substring($s,1,1)),
replace(substring($s,2), '^(.+),.*','$1')
)
I understand this would impose more burden on implementers, but has
there been demand from the user community (including XSLT folk)?
(Count this email as "demand", of course.)
DS
--
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: http://x-query.com/mailman/listinfo/talk Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
|
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
|






