OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] XMLDecl version




Robin Berjon writes:
 > it is unclear to me from the XML spec whether <?xml version='1'?> is 
 > well-formed or not. At first glance it seems that Expat accepts it, while 
 > xmllint croaks on it. The spec doesn't say whether version 1.0 is about 
 > string equality or number comparison.

  I can't speak for the XML groups at the W3C, but the way *I* read
the spec, this is a bug in Expat.  (James, would you say otherwise?)
I think xmllint is right since the spec says (sec. 2.8):

    It is the intent of the XML working group to give later versions
    of this specification numbers other than "1.0", but this intent
    does not indicate a commitment to produce any future versions of
    XML, nor if any are produced, to use any particular numbering
    scheme.

  Since they aren't committed to a numbering scheme, and they always
refer to this version as "1.0" (with the quotes), I don't think we can
infer any sort of interpretation.
  Later in the same paragraph, the spec says:

    Processors may signal an error if they receive documents labeled
    with versions they do not support.

  Note the use of "may" -- it is *allowed* for a processor to do
whatever it wants with something that does not conform, and I'll go so
far as to infer that it isn't allowed to claim the document conforms
with XML "1.0", but is not required to scream bloody murder.
  As a user, however, I'd sure expect it to!  Unless there are
objections, I'll propose that Expat be fixed.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation