Re: [xsl] Are XPath expressions parsed using compiler parsing techniques?

Subject: Re: [xsl] Are XPath expressions parsed using compiler parsing techniques?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 8 May 2022 23:10:27 -0000
> > Are XPath expressions parsed using compiler parsing algorithms?
>


Yes, of course, how else would you do it?

If you want to know more, I'm hoping to have a paper on the subject at XML
Prague next month.

But if you're interested in this kind of thing, there's a fair bit in my blog
over the years: see https://dev.saxonica.com/blog/mike/

(Incidentally, there's one little XPath parsing trick that's quite amusing. It
turns out that about one in three XPath expressions (especially in XSLT)
contains 4 tokens or less, and you can get a saving by just recognising the
common patterns of tokens: if it's "@" followed by a QName, you can recognize
that as a known pattern and emit the corresponding syntax tree without doing
full parsing at all).

Michael Kay

Current Thread