- From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
- Date: Tue, 4 Jan 2022 10:45:31 -0700
- To: ixml <public-ixml@w3.org>
- Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
A somewhat shorter version of the pragmas proposal Tom Hillman and I have developed is now in the ixml repo on the proposal-pragmas branch: https://github.com/invisibleXML/ixml/blob/proposal-pragmas/misc/pragmas-proposal.md Basic summary: syntactically a pragma is a pair of square brackets enclosing an optional mark, a QName or URI-qualified name, and optional pragma data (which may contain paired square brackets). Examples: [my:blue] [Q{http://example.com/ns/props}color blue] [their:rewrite comment: -"{", (cchars; comment)*, -"}". [ls:token] -cchars: cchar+. ] The use of square brackets allows all processors to recognize them and process or ignore them. The use of QNames allow processors to understand whether the pragma is one they support or not using the same logic familiar from the use of namespaces in other XML-related contexts. Pragmas also have an XML form, which follows naturally from the grammatical definition of pragmas. To allow pragmas to use prefixed names in the usual way, we propose to add a pragma for namespace declarations. A pragma whose QName uses the prefix 'ixmlns' is a namespace declaration. Examples: [ixmlns:xsd http://www.w3.org/2001/XMLSchema] [ixmlns:rng http://relaxng.org/ns/structure/1.0] As things stand, colons are not allowed in ixml nonterminal names, so namespace declarations are used only in expanding QNames in pragmas. A pragma-oblivious processor can thus ignore all pragmas. If we decide to allow colons in nonterminal names and specify that namespace bindings should apply to the XML output, then all processors willl need to understand namespace declarations. MIchael
Received on Tuesday, 4 January 2022 17:45:50 UTC