An XML 1.0 parser might, or might not accept to parse documents that have other version number than 1.0
. The behaviour of your XML parser depends on what edition of XML 1.0 recommendation it conforms to.
First editions
W3C XML recommendations editions 1 & 2 said:
The version number "1.0" should be
used to indicate conformance to this
version of this specification; it is
an error for a document to use the
value "1.0" if it does not conform to
this version of this specification.
...
Processors may signal an error if
they receive documents labeled with
versions they do not support.
and the valid values for version
in XML declaration were
[26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+
ref: http://www.w3.org/TR/1998/REC-xml-19980210#sec-prolog-dtd
Third edition
This was changed for the 3rd edition. The paragraph that I quoted above, was removed and value of version
was fixed to 1.0
[26] VersionNum ::= '1.0'
This practically meant, that XML 1.0 parser should see other version numbers as errors.
ref: http://www.w3.org/XML/xml-V10-2e-errata#E38
Fifth edition
Parsing of other versions was again allowed in 5th edition, when a new change practically reversed the previous change. Two new paragraphs were added
Even though the VersionNum production
matches any version number of the form
'1.x', XML 1.0 documents SHOULD NOT
specify a version number other than
'1.0'.
Note: When an XML 1.0 processor
encounters a document that specifies a
1.x version number other than '1.0', it will process it as a 1.0 document.
This means that an XML 1.0 processor
will accept 1.x documents provided
they do not use any non-1.0 features.
The valid values for version
now have form 1.x
[26] VersionNum ::= '1.' [0-9]+
ref: http://www.w3.org/XML/xml-V10-4e-errata#E10
Summary
It is risky to use other version number than 1.0
(also for XML 1.0 documents), since a parser might refuse to process it. If you make such change, you need to know that the document will only be handled with XML 1.1 compatible tools (or XML 1.0 5th Ed. compatible tools, but then you can't use any XML 1.1 features).