RE: PIs with target "XML" etc.

> -----Original Message-----
> From: public-xml-core-wg-request@w3.org [mailto:public-xml-core-wg-
> request@w3.org] On Behalf Of Liam R E Quin
> Sent: Thursday, 2011 February 10 19:17
> To: John Cowan
> Cc: public-xml-core-wg@w3.org
> Subject: Re: PIs with target "XML" etc.
> 
> On Thu, 2011-02-10 at 17:43 -0500, John Cowan wrote:
> > The XML conformance tests assume that a PI with <?XML ...?> (or Xml,
> > XmL, etc.)  is not well-formed.  However, 2.6 only says "reserved
for
> > standardization", the same language used for elements and attributes
> > beginning with the three letters.  So our rec and our tests don't
> agree.
> 
> I think the Rec should probably win here.

It does.  Production 23 should be considered the most
authoritative definition of what an XMLDecl is, and it
says that it must start with (lowercare) xml.  All
other forms do not parse against this production and
are therefore not XMLDecl's.  

They are therefore PIs (production 16) and the 
miscapitalized XML is a PITarget (production 17) 
which clearly says that a PITarget cannot be any 
capitalization of xml.

And the "reserved" statement there reads in full:

 The target names "XML", "xml", and so on are
 reserved for standardization in this or future
 versions of this specification. 

Note "of *this* specification" meaning the XML spec,
and since this spec does not define any standardization
of XML, use of such a PITarget is not allowed by this
spec, so such a use is a well-formedness error.

paul

> 
> I don't see a need to make existing (admittedly erroneous) documents
> fail.  I don't think this case is any worse than having a space before
> <?xml..., although I see libxml makes that a fatal error rather than
> treating it as a "reserved" processing instruction.
> 
> I could live with an error for <?XML, too, though.
> 
> Liam
> 
> --
> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
> Pictures from old books: http://fromoldbooks.org/
> 

Received on Friday, 11 February 2011 14:32:12 UTC