no empty iXML prologs

Michael said earlier that he had an idea about how to formulate a grammar with optional, non-empty prolog(ue)s, but if we allow a choice of (optional) prolog types (e.g. version and namespace declarations), I'd be interested to see what that looks like...

       ixml: s, prolog?, rule+RS, s.
     prolog: prologChild+RS.
-prologChild: version; nsdecl.

but this would then allow

• multiple version declarations
• version declarations not at the start of the prolog

 ixml: s, prolog?, rule+RS, s.
prolog: version, RS, nsdecl*RS; (version, RS)?, nsdecl+RS.
would be OK-ish for now, but scales horribly should there be another candidate member for the prolog.

I am intrigued by the idea of Michael showing us something wonderful I've not considered, but if not, maybe allowing an empty prolog isn't terrible?

Tomos Hillman
eXpertML Ltd
+44 7793 242058

Received on Tuesday, 12 April 2022 16:23:44 UTC