xsl-list
[Top] [All Lists]

RE: [xsl] lookaheads in XSLT2 regexes

2010-02-26 12:21:49
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().

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay  

-----Original Message-----
From: james(_at_)blushingbunny(_dot_)net 
[mailto:james(_at_)blushingbunny(_dot_)net] On Behalf Of James Cummings
Sent: 26 February 2010 18:07
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] lookaheads in XSLT2 regexes

On Fri, Feb 26, 2010 at 17:29, Martin Honnen 
<Martin(_dot_)Honnen(_at_)gmx(_dot_)de> wrote:
No, as far as I know and as far as
http://www.w3.org/TR/xquery-operators/#regex-syntax describes those 
constructs do not exist in the regular expression language 
that XPath 
2.0 and XSLT 2.0 use.

I thought that was what you were going to say (and I should 
have just looked at the spec before posting, mea culpa). I 
can't think of any other way to do this with the 
analyze-string recursive replacing with xsl:sequence...and 
I'm loathe to change that much since it is working fine!  I 
suppose one answer is to transform the input so it has 
better/more/different delimiters of some sort, but I'll have 
to think that through.

Ah well,
-James

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>