[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|