W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > February 2011

Re: PIs with target "XML" etc.

From: John Cowan <cowan@mercury.ccil.org>
Date: Fri, 11 Feb 2011 11:47:39 -0500
To: "Grosso, Paul" <pgrosso@ptc.com>
Cc: public-xml-core-wg@w3.org
Message-ID: <20110211164739.GA19997@mercury.ccil.org>
Grosso, Paul scripsit:

> 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.                                                                                                      

No argument from me there.


> 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.

Sorry, I can't swallow that.  Section 2.3 says:

    Names [of elements and attributes] beginning with the string "xml",
    or with any string which would match (('X'|'x') ('M'|'m') ('L'|'l')),
    are reserved for standardization in this or future versions of this
    specification.

On your argument, that would mean that any use of xml: in element
and attribute names other than xml:space and xml:lang would be a
well-formedness error, including xml:id and xml:base, which is absurd.
Even if you interpret "this specification" as including other W3C
specifications, no parser throws a fatal error if you use an element
named xml:bozo or an attribute named XML-SHOUTING.

Indeed, a fatal error exists iff the "document" production is not matched
or a WFC is violated, per section 2.1.  I see no reason to believe that
the use of the word "reserved" makes the paragraphs in sections 2.3, 2.6,
and 3 equivalent to a WFC.

-- 
John Cowan        http://ccil.org/~cowan   cowan@ccil.org
Lope de Vega: "It wonders me I can speak at all.  Some caitiff rogue
did rudely yerk me on the knob, wherefrom my wits yet wander."
An Englishman: "Ay, belike a filchman to the nab'll leave you
crank for a spell." --Harry Turtledove, Ruled Britannia
Received on Friday, 11 February 2011 16:48:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 11 February 2011 16:48:07 GMT