[Home] [By Thread] [By Date] [Recent Entries]
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.
|

Cart



