This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
3.7.2 Other Direct Constructors "The PITarget of a processing instruction may not consist of the characters "XML" in any combination of upper and lower case." The spec should say what error to raise for violations of this requirement. (This bug is similar to Bug 11609.)
It should also say "must not" rather than "may not".
There are other examples where the resulting document will not be well formed and it's not an error. I'd rather that this was left as a SHOULD, possibly with a note about how <?xml ...?> will likely be interpreted as an XML declaration, and pointing to serialization options to control what goes there.
(In reply to comment #1) > It should also say "must not" rather than "may not". (Indeed: it's been changed to "must not" in 3.0.)
(In reply to comment #2) > I'd rather that this was left as a SHOULD, You mean *changed to* a SHOULD? Or do you mean that the current wording is effectively a SHOULD?
Section 3.7.3.5[1] makes it a dynamic error (err:XQDY0064) for the target of a computed processing instruction constructor "if the NCName is equal to "XML" (in any combination of upper and lower case) [err:XQDY0064]." I submit that it was merely an oversight not to apply the same or a similar error for a direct processing instruction constructor. [1] http://www.w3.org/TR/2010/REC-xquery-20101214/#id-computed-pis
Now that I think about it, I believe the error for the PITarget in 3.7.2 is XPST0003. The definition of PITarget is, by reference to the appropriate version of XML, PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) If the PITarget were XmL, say, that would not conform to the syntax of XQuery, so error XPST0003 results. I believe the text in 3.7.2 is drawing attention to that restriction.
(In reply to comment #6) > The definition of PITarget is, by reference to the appropriate > version of XML, > > PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) Ah! I had been thinking PITarget was just NCName. XPST0003 it is then. I'll mark this as resolved-invalid, then close it.