[
Lists Home |
Date Index |
Thread Index
]
- To: xml-dev@lists.xml.org
- Subject: Re: When is the XML PI <?xml?> required ?
- From: Richard Tobin <richard@cogsci.ed.ac.uk>
- Date: Tue, 18 Nov 2003 22:42:10 GMT
- Cc:
- In-reply-to: <m3y8udcpa7.fsf@localhost.localdomain>
- Organization: HCRC, University of Edinburgh
- References: <3fb7c121$0$237$636a55ce@news.free.fr> <bp8i0s$1lsoqd$1@ID-152440.news.uni-berlin.de>
>Also note that, at least AFAICT, if the version is not 1.0, the
>xml declaration is still not necessarily required (unless it is
>required by that later specification). In particular, the current
>XML 1.1 Proposed Recommendation still specifies the xml
>declaration as optional
Woops! I think that's a mistake, and needs to be fixed. I'm
surprised no-one commented on it before.
An XML document without an XML declaration should be interpreted as
an XML 1.0 document; it should only be treated as XML 1.1 if it has
an XML declaration with version="1.1".
I think it's important that a document be either an XML 1.0 document
or and XML 1.1 document; we don't want documents that are sometimes
treated as one and sometimes the other.
>-- which is entirely appropriate
>considering that the vast majority (probably all) of existing XML
>1.0 documents are conforming XML 1.1 documents, and it is also
>quite easy to write XML 1.1 documents that conform to the
>1.0.
The way this is expected to work is not that a document is both a 1.0
and 1.1 document, but rather that all 1.1 parsers will also be 1.0
parsers. XML 1.0 is not going away an time soon; it is not in any way
deprecated by the existence of XML 1.1. There's no reason to label a
document 1.1 unless you use 1.1 features.
>While it's usually preferable to specify the XML
>declaration, there are situations in which it would be useful to
>keep the XML version vague:
I don't think that's right: it should be clear that a document is XML
1.0, so that there's no doubt that 1.0 parsers must accept it.
And it's also important to be clear what the version of a document is so
that there is no doubt about what it's infoset is.
-- Richard
|