Closed
Bug 500139
Opened 16 years ago
Closed 10 years ago
XML 1.0 Fifth Edition unsupported
Categories
(Core :: XML, defect)
Core
XML
Tracking
()
RESOLVED
DUPLICATE
of bug 501837
People
(Reporter: 1981km, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
The XML parser in Firefox seems to be limit the allowable values for the version pseudo-attribute in XML declaration to "1.0". It was so in 3th and 4th editions. The others (including the current 5th) are more liberal. My use case is to have multilingual 1.0 and 1.1 documents.
Reproducible: Always
Steps to Reproduce:
Open an XML document beginning with <?xml version="1.1"?>.
Actual Results:
The document is rejected as ill-formed.
Expected Results:
The document is parsed as XML 1.0 or XML 1.1.
This is not a duplicate of bug 233154.
Comment 1•16 years ago
|
||
Could you expand a little on your use case?
It's certainly possible to do, the way we reject anything but "1.0" is a Mozilla modification to Expat from bug 62157, but from a casual look it's hard to see what the point is.
If your XML is well-formed 1.0, then what are you gaining by calling it 1.1? If your XML is not well-formed 1.0, then it doesn't matter whether we fail to parse it because we refuse to parse 1.1, or because we pretend 1.1 is 1.0 and then blow up when we see an element name with a character not permitted by 1.0.
Component: File Handling → XML
Product: Firefox → Core
QA Contact: file.handling → xml
Hardware: x86 → All
Version: unspecified → Trunk
| Reporter | ||
Comment 2•16 years ago
|
||
Bug 62157 was valid at that time. Now it has become wrong. See the evolution of the VersionNum production from 1998's original spec through all subsequent (as I already mentioned, only 3rd and 4th disallowed everything but "1.0"). Current is: http://www.w3.org/TR/2008/REC-xml-20081126/#NT-VersionNum. Also, the XML Core Working Group Public Page (http://www.w3.org/XML/Core/) says:
> XML Parsers are expected to understand both XML 1.0 and XML 1.1.
Even though Expat is currently a 1.0 parser only, documents with version="1.1" (and also e.g. "1.404") are well-formed XML 1.0 and sholud not be rejected. My use case then is to be able to use toolchains (including UAs) of both 1.0 and 1.1 by having documents which are simultaneously well-formed XML 1.0 and 1.1. In most cases this is indeed possible, simply by replacing version="1.0" by version="1.1".
| Reporter | ||
Comment 3•16 years ago
|
||
Just a comment to clarify (hopefully). This is about polyglot documents - well-formed as both XML 1.0 and XML 1.1. They're a vast majority of 1.1 documents and almost every XML 1.0 document becomes polyglot when you mark it with version="1.1". But this wide class is unsupported by Firefox, contrary to the XML 1.0 Fifth Edition spec.
Updated•10 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•