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

Re: lookaheads in XSLT2 regexes

Subject: Re: lookaheads in XSLT2 regexes
From: James Cummings <james+xsl@xxxxxxxxxxxxxxxxx>
Date: Mon, 1 Mar 2010 10:59:37 +0000
Re:  lookaheads in XSLT2 regexes
On Fri, Feb 26, 2010 at 18:21, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> If you're completely stuck, there's an undocumented, largely untested, and
> completely non-conformant option in Saxon - if the flags attribute starts
> with "!", you can use full Java regular expression syntax in the regex
> attribute. This may not work perfectly, for example it may disrupt the
> counting of captured groups in regex-group().

This sounds like just what I want.  It isn't for a production system,
and one step in a pipeline of transformations for a one-off
conversion.  However I have a problem:  When I put ! into the flags
attribute of analyze-string I get the following error:

 FORX0001: Invalid character '!' in regular expression flags

from:

 <xsl:analyze-string select="$str" regex="{$abbr[1]}" flags="!">

This is with: Saxon-HE 9.2.0.6J and Java(TM) SE Runtime Environment
(build 1.6.0_14-b08)

Any suggestions what I'm doing wrong.  (I didn't even notice the
@flags attribute before, so at least have learned something new
today.)

Many thanks,

-James

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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