- From: Norm Tovey-Walsh <norm@saxonica.com>
- Date: Mon, 02 Mar 2026 09:54:17 +0000
- To: "Graydon Saunders" <graydonish@fastmail.com>
- Cc: public-ixml@w3.org
"Graydon Saunders" <graydonish@fastmail.com> writes:
> So I can see an extension of that approach where you would want to switch parsers as well as grammars
I think one reasonable approach for “different grammars in different contexts” is to use XPath (in 4.0) or XSLT (with CoffeeSacks, for example) to select the context in XPath/XSLT then parse with the grammar you want.
That said, I still want to experiment with allowing grammar authors to do this directly. To have a grammar that matches “big complicated thing” with a simple rule and then passes the matched thing off to a different grammar to parse its structure. Not because it’s impossible to do this in one grammar but because it might be a lot easier for authors if they could keep them separate.
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
Received on Monday, 2 March 2026 09:54:30 UTC