OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Validate an XPath with regex

[ Lists Home | Date Index | Thread Index ]

Hi Niels,

I'm not a linguistics expert but I think that regular expressions and 
XPath expressions come at different levels of the Chomsky hierarchy [1] 
- regular expressions would be type 3, Regular, but XPath would be type 
2, Context Free. One notable difference is that you can't specify 
balanced syntax with type 3 grammars, so you couldn't specify anything 
requiring correctly nested square or round brackets for instance.

Hope this helps -

Francis.

[1] http://www.wikipedia.com/wiki/Chomsky_hierarchy

Niels Peter Strandberg wrote:

> Shouldn't it be possible to validate the syntax of an XPath string 
> using regular expressions. Im not a regex expert, so just want to ask 
> you out there if it could be done.







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS