Re: XPath support for using multiple ixml implementations

Something like 

non-terminal = grammar-uri

especially if it allowed nesting (=the referenced grammar can also use this construct) would be enormously welcome from this corner. Being able to write the date parsing grammar once and use it in many places would almost have to be a lot easier.

I would not usually approve of specifying a parser in the grammar URI but that seems like it wouldn't be very different from a lot of current common practice.

-- Graydon

On Mon, Mar 2, 2026, at 04:54, Norm Tovey-Walsh wrote:
> "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 15:37:01 UTC