Closed Bug 233154 Opened 21 years ago Closed 11 years ago

Add support for XML 1.1

Categories

(Core :: XML, enhancement)

enhancement
Not set
normal

Tracking

()

VERIFIED WONTFIX

People

(Reporter: xanthor+bz, Assigned: hjtoi-bugzilla)

References

()

Details

User-Agent:       
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Epiphany/1.0.7

When we use the XML 1.1 prolog (<?xml version="1.1" ?>) as defined in the XML
1.1 spec, Mozilla display a parsing error...

Reproducible: Always
Steps to Reproduce:
1. Write a XML page, and write in the prolog version="1.1" instead of the
traditionnal version="1.0"
2. Try to display it with Mozilla


Actual Results:  
XML Parsing Error: syntax error
Location: http://localhost/temp/xml1.1.xhtml
Line Number 1, Column 16:

<?xml version="1.1" ?>
---------------^

Expected Results:  
Parse it like every XML file
Just as a guess, it's not a valid XML 1.0 document (it's not), and we don't 
have an XML 1.1 parser. XML 1.0 parsers can't parse XML 1.1 documents under any 
circumstances, as far I can see.

We could change this bug into a RFE to start using an XML 1.1 parser, but I 
think that would depend upon support in a future version of the Expat parser 
(XML 1.1 support isn't in Expat 1.2, the current stable version, nor is it 
planned for Expat 2.0, which is in development, or event Expat 3.0). See 
http://www.libexpat.org/dev/roadmap.html for more information.
Sorry.. I didn't tought there were so important changes :¬/
The changes are pretty significant.  Further, we use a stock XML parser, so we
have to wait for them to add XML 1.1 support (or switch to a totally different
XML parser).
Severity: minor → enhancement
Summary: Parsing error when using XML 1.1 (version="1.1") → Add support for XML 1.1
Confirming as a valid RFE, and yes, this is pretty much out of our control as 
long as we continue to use Expat.
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 252777 has been marked as a duplicate of this bug. ***
*** Bug 280767 has been marked as a duplicate of this bug. ***
Blocks: 88338
There is no timeline on the expat side for the last year.
http://sourceforge.net/tracker/index.php?func=detail&aid=891265&group_id=10127&atid=110127

Peter, could you nag? XML 1.1 would enable me to use empty prefixed namespaces,
nice to migrate RDF away from deprecation problems.
Why don't the parser just ignore the XML version and parse the file like XML 1.0?
(In reply to comment #9)
> Why don't the parser just ignore the XML version and parse the file like XML
> 1.0?
Because XML 1.1 is not compatible with XML 1.0. If it's compatible, version bumping is not required in the first place.
(In reply to comment #1)
> Just as a guess, it's not a valid XML 1.0 document (it's not), and we don't 
> have an XML 1.1 parser. XML 1.0 parsers can't parse XML 1.1 documents under any 
> circumstances, as far I can see.
> 
> We could change this bug into a RFE to start using an XML 1.1 parser, but I 
> think that would depend upon support in a future version of the Expat parser 
> (XML 1.1 support isn't in Expat 1.2, the current stable version, nor is it 
> planned for Expat 2.0, which is in development, or event Expat 3.0). See 
> http://www.libexpat.org/dev/roadmap.html for more information.

This bug hasn't been fixed since 2004. Mozilla needs to make an XML 1.1 parser quick!
QA Contact: ashshbhatt → xml
(In reply to Malcolm Rowe from comment #1)
> Just as a guess, it's not a valid XML 1.0 document (it's not), and we don't 
> have an XML 1.1 parser. XML 1.0 parsers can't parse XML 1.1 documents under
> any 
> circumstances, as far I can see.
> 
> We could change this bug into a RFE to start using an XML 1.1 parser, but I 
> think that would depend upon support in a future version of the Expat parser 
> (XML 1.1 support isn't in Expat 1.2, the current stable version, nor is it 
> planned for Expat 2.0, which is in development, or event Expat 3.0). See 
> http://www.libexpat.org/dev/roadmap.html for more information.

Actually, according to the W3C, an XML 1.0 parser will parse any 1.x document as 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." -- Quoted from http://www.w3.org/TR/xml/#xmldoc
So even if you can't parse XML 1.1 per se, that still doesn't mean you can't just treat it as XML 1.0 .  I do still recommend somehow adding XML 1.1 support, though.
This is not going to happen.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
@Anne: any further explanation why? There's more to life (and the Web) than HTML 5, you know.
Till proper explanation
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
See http://norman.walsh.name/production/2008/02/07/xml105e
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → WONTFIX
(In reply to David Baron [:dbaron] (don't cc:, use needinfo? instead) from comment #17)
> See http://norman.walsh.name/production/2008/02/07/xml105e

Interesting, but normative? XML 1.1 may have issues, but it's definitely not DOA. Is there somewhere else we could discuss this so we don't clutter up the bug?
> Interesting, but normative?

Just because the W3C has published something an normative does not mean that it's a good idea or something that Mozilla should implement. As seen from the blog post that dbaron referenced, even the XML Core WG has given up on 1.1. They still try to introduce some of the backwards-incompatible changes as 1.0 5th ed. Backwards-incompatible changes don't make sense for formats that have Draconian error handling.

I expect XML support in Firefox to stay at 1.0 4th ed. 

Moving to 5th ed. would just amount to handing vocabulary designers a footgun that takes a spec lawyer to debug. There will always be 4th ed. and earlier parsers around, so it will continue to be a terrible idea to use the characters allowed by 5th ed. but not 4th ed. in an XML vocabulary. (Since such vocabularies will fail spectacularly in 4th ed. parsers.)

If we expect reasonable vocabulary designers not to actually use the new stuff from the 5th ed., supporting the 5th ed. doesn't add any value to Firefox.
Status: RESOLVED → VERIFIED
To be honest, Mozilla,… as so many things you do… this is just ridiculous.

XML 1.1 is simply the newest version of XML,... it's standardised, it's recommended and it works just fine.

It seems that all other major browsers support it already (well it's eleven(!) years old).


You really became so much like Microsoft... deciding against well established standards and coming up with your own stuff.
Deciding against well working formats for obscure reasons just you don't like them... and this bug tracker already records so many of these cases (MNG, WebP, JPEG2000).

You don't let the users their freedom and have the community decided which standards and formats are widely used, but you forcibly take those decisions ... well as I've said... just as Microsoft does and did in the past.

You even admit (see the other bug reports), that you'd only start supporting new formats that you don't like, if massive pressure would be put on Mozilla so that you have no choice... as it happened with H.264... even though this is a bad example, as you supported "evil" there.

Really disturbing.
(In reply to Christoph Anton Mitterer from comment #21)
> It seems that all other major browsers support it already (well it's
> eleven(!) years old).
Did you check that?
@Phoenix, sure... it works with Chromium and Epiphany, which makes me blindly guess that it's supported by webkit, which would make it supported by Opera and Safari as well.
You said about major browsers, I don't see any of those in your list
Well... there are only 4-5 major browser... IE, FF, Chrome, Safari and perhaps Opera....

FF lacks support
IE, don't know but even if it would, it's probably a bad idea to take IE as example

and all the others are webkit based and though should support it...
Adding worthwhile comment IMO, Safari does not support XML 1.1, look at feature list: http://www.apple.com/safari/features.html
Under Advanced Web Technologies only XML 1.0 support is mentioned. Which makes me believe that Webkit does not support XML 1.1.
Opera - Presto engine is doomed. Other major browser engine left is Internet Explorer (Trident).
(In reply to Christoph Anton Mitterer from comment #25)
> Well... there are only 4-5 major browser... IE, FF, Chrome, Safari and
> perhaps Opera....
Only 3, and one of them have two versions each of those have same share as two others have by themselves. Safari? Opera? Major only in mobile world ), and as Zlip792 noted you again failed, this time with Safari ;)

Anyway, FF devs stated clearly enough and I'm not sure that they change their mind even if you provide patch, not only arguing for adding support. I'm out of this.
WebKit was not even present eleven years old.
Could you attach a sample XML 1.1 file to prove that only Firefox can't open it?
Chrome et al don't support XML 1.1. E.g. load data:text/xml,<?xml version="1.1"?></> and witness "warning on line 1 at column 19: Unsupported version '1.1'". What they have done however it seems is implemented XML 1.0 5th Edition which allows for any number after "1.". E.g. <?xml version="1.9"?><x/> will work in Chrome too.

I guess at some point we should get together and decide what version of XML we all want to support forever...
If we ever start changing the XML parser, I think we should go all the way to XML5 and not bother with intermediate steps.
Bug 501837 is already present for XML 1.0 5th edition.
You need to log in before you can comment on or make changes to this bug.