[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Regular Expressions in XPath 2.0

Subject: Re: Regular Expressions in XPath 2.0
From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx>
Date: Mon, 23 Apr 2007 11:24:44 -0400
Re:  Regular Expressions in XPath 2.0
On 4/23/07, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> I thought I'll share the above presentation as regular
> expressions in XPath are based on Perl.

It's an interesting article. But of course the statement that "regular
expressions in XPath are based on Perl" has nothing to do with it: that's a
statement about the syntax, not about the implementation or choice of
algorithm.

Good point, thank you for clarifying.



The article is about different ways of implementing regular expressions. The most interesting point it makes, I think, is that back-references turn regular expressions into non-regular expressions, and that this requires the use of backtracking implementation algorithms (which have worst-case performance that is exponential). But of course the vast majority of regexes do not use back-references, so any of the classical algorithms can be used.

Ok.


There are some interesting trade-offs between the time taken to compile a
regular expression and the time taken to execute it. Determinizing an NFA
can be an expensive operation. This is rarely discussed in the theory, as
far as I can tell, though some of the papers do talk about incremental
determinization. You see this in schema processors (which use the regular
expression approach to validate an XML document against a grammar) - Saxon
creates a deterministic FSA for this, which has excellent run-time
performance, but in pathological cases creating the DFSA can be extremely
slow.


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


-Thank you Rashmi

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.