xsl-list
[Top] [All Lists]

Re: [xsl] check the type of the $pattern argument to a regular expression?

2007-04-16 06:24:53
Hi,

I thought the XML Schema regex limitations were not applicable to XSL-T regex's.

Cheers,
Bryan Rasmussen

On 4/16/07, Abel Braaksma <abel(_dot_)online(_at_)xs4all(_dot_)nl> wrote:
bryan rasmussen wrote:
> Is there a concise description somewhere as to how they differ, are
> there a large number of xslt regular expressions that are compatible
> with Java regular expressions or are they basically incompatible? I
> would suppose the main difference is that XSL-T regular expressions
> are Unicode compatible regex's  - correct?
>

I don't suppose there is such an overview. Some flavors are explained in
Jeffrey Friedl's famous book and some are (briefly) explained here:
http://regular-expressions.info. But they don't explain W3's favorite
flavor (which is to a large part one-way compatible with Perl's flavor).
You could check and compare the following:

XSLT / XPath regexes: http://www.w3.org/TR/xmlschema-2/#regexs and
http://www.w3.org/TR/xpath-functions/#regex-syntax
Java regexes:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html

The most obvious differences in syntax I found are the Java specific
constructs, which are not covered in W3's flavor, like \p{javaLower}
etc., possessive quantifiers, Quotation (\Q - \E), end/start of text (\A
and \Z) and all special constructs (there is no look-ahead/look-behind,
non-capturing parentheses, flags on/of in a group etc).

Cheers,
-- Abel Braaksma

--~------------------------------------------------------------------
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>