Re: [xsl] Support for lookaround regexp in XSLT -- any time soon?

Subject: Re: [xsl] Support for lookaround regexp in XSLT -- any time soon?
From: Manuel Souto Pico <m.soutopico@xxxxxxxxx>
Date: Fri, 1 Mar 2013 03:11:36 +0000
Thank you, Liam.

I will have a look at the W3C Bugzilla and will try to add a feature
request. It's good that it's so relatively easy to have features
included in the language.

The reason why this is needed is to be able to find all kinds patterns
in XML files, as a kind of linguistic quality control. Lack of
lookaround assertions is a serious limitation when using XSLT to
generate reports based on the input XML document.

Cheers,

Manuel Souto Pico
Linguist 7 Translation technologist
http://www.msoutopico.es
es.linkedin.com/in/msoutopico


On 28 February 2013 03:24, Liam R E Quin <liam@xxxxxx> wrote:
>
> On Thu, 2013-02-28 at 00:20 +0000, Manuel Souto Pico wrote:
> > Hi there,
> >
> > I've been using XSLT/XPath for some time to find patterns in
> > (XML-based) XLIFF files, but now I'm going to need more complex
> > regexps (e.g. positive/negative lookaround/lookbehind/lookahead, aka
> > zero-width assertions, or non-capturing groups) and I see that they
> > are not supported.
>
> The best way to ask for such features is to enter them into the W3C
> Bugzilla instance for the Path & XQuery Functions and Operators
> specification, together with a use case for why they are needed.
>
> Note that the 3.0 "Candidate Recommendation" draft does have
> non-capturing (?....) groups.  I don't think we added the zero-width
> assertions, possibly because no-one has asked for them.
>
> See http://www.w3.org/TR/xpath-functions-30/ for the latest version of
> Functions and Operators, and the Status section at the start has
> instructions for submitting comments.
>
> I am not sure that we can add such features for 3.0, because the
> metaphorical train is already pulling out of the metaphorical station
> with a full head of metaphorical steam, but if we've missed it there's
> likely to be an XPath 3.1 right behind it, as soon as the platform's
> clear. Metaphorically speaking.
>
> Liam
>
> --
> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
> Pictures from old books: http://fromoldbooks.org/
> Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

Current Thread