Re: [xsl] Regular Expressions in XPath 2.0

Subject: Re: [xsl] Regular Expressions in XPath 2.0
From: mozer <xmlizer@xxxxxxxxx>
Date: Sat, 21 Apr 2007 20:00:41 +0200
Hi Rashmi,

On 4/21/07, Rashmi Rubdi <rashmi.sub@xxxxxxxxx> wrote:
I guess XPath is not off-topic to this list, if it is then I'm sorry
about this post.

I have just started learning the 2.0 versions of XSLT and XPath and
recently learned that Regular Expressions were introduced in XPath 2.0
and were not in XPath1.0.

I would like understand a few things about the Regular Expressions in
XPath 2.0.

According to the slide here:
http://www.mulberrytech.com/papers/XPath-2-0-User-Grp-HTML/slide060.html
the regular expressions in XPath are taken from Perl.

Almost every Regexp package in every language, find it's root in Perl's regexp



I've studied Regular Expressions in school a long time ago, but I've never learned Perl.

I have a few questions

1) Are regular expressions in XPath 2.0 identical or are they similar
to those in Perl?

They are similar and certainly not identical An important information, is that they are an extension of XML Schema's Regexp.


2) What would be the best approach to re-learn Regular Expressions with respect to XPath 2.0, I know I have to first re-learn the basics of regular expressions too.

I would say that learning them for XPath, is a good start because you can test them easily in XSLT examples.



I think there's a standard for Regular Expressions

I don't think so...There is a theory behind Regular expressions, but no standard (apart the fact that Perl's Regexp are one of the most referenced implementation)

and each
programming language specializes or deviates from the standard.

Thank you for your input.

-Rashmi


Xmlizer

Current Thread