ORA-XQ-098-B: Not good to make must-understand extensions look like comments

SECTION 2.6.6: must-understand extensions

Making the pragma lexically an overloading of a comment
is a good idea, because an implementation that has no pragmas
can simplify their grammar to treat pragmas the same as comments
(ie, don't distinguish them as separate lexical categories).  The
same does not apply to must-understand extensions.  An 
implementation that has no must-understand extensions must still 
be on the look-out for them, because encountering a must-understand 
extension when you have none is a syntax error.  For that reason, 
it seems like a bad idea to make the syntax for a must-understand 
extension be an overloading of the comment syntax.  This means that 
a simple implementation with neither pragmas nor must-understand 
extensions can not treat anything beginning with (: as a comment.  
Instead it is still burdened with the need to detect "(:: extension" 
because that is not a comment, it is a must-understand extension 
(and, for that implementation, a syntax error).  Some other way of 
denoting a must-understand extension would be preferable.
Some ideas are

MUExtensions ::= "{:" QName ExtensionContents* ":}"

MUExtensions ::= "ext" "{" QName ExtensionContents* "}"


- Steve B.

Received on Monday, 16 February 2004 14:49:13 UTC