Firefox - Add support for XML 1.1

Bug #316373 reported by Michael Tsang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Won't Fix
Wishlist
firefox-3.5 (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

consider this xhtml 1.1 document:

<?xml version="1.1" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
<head>
<title>
test
</title>
</head>
<body>
<p>
test
</p>
</body>
</html>

XML Parsing Error: XML declaration not well-formed
Location: file:///home/michael/test.xhtml
Line Number 1, Column 16:<?xml version="1.1" encoding="utf-8"?>
---------------^

when i change the xml version into 1.0, everything works perfectly.

Revision history for this message
In , Malcolm-bmo (malcolm-bmo) wrote :

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.

Revision history for this message
In , Xanthor (xanthor) wrote :

Sorry.. I didn't tought there were so important changes :¬/

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

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).

Revision history for this message
In , Malcolm-bmo (malcolm-bmo) wrote :

Confirming as a valid RFE, and yes, this is pretty much out of our control as
long as we continue to use Expat.

Revision history for this message
In , Joshbirnbaum-mozil (joshbirnbaum-mozil) wrote :

*** Bug 252777 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jo-hermans (jo-hermans) wrote :

*** Bug 280767 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Axel-pike (axel-pike) wrote :

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.

Revision history for this message
Michael Tsang (michaeldadmum-deactivatedaccount) wrote : firefox can't parse xml 1.1 documents

consider this xhtml 1.1 document:

<?xml version="1.1" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
<head>
<title>
test
</title>
</head>
<body>
<p>
test
</p>
</body>
</html>

XML Parsing Error: XML declaration not well-formed
Location: file:///home/michael/test.xhtml
Line Number 1, Column 16:<?xml version="1.1" encoding="utf-8"?>
---------------^

when i change the xml version into 1.0, everything works perfectly.

Revision history for this message
In , Kevin Brosnan (kbrosnan) wrote :

*** Bug 488326 has been marked as a duplicate of this bug. ***

Revision history for this message
Micah Gersten (micahg) wrote : Re: firefox can't parse xml 1.1 documents

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest version of Firefox? Thanks in advance.

I was not able to duplicate in Firefox 3.0.10 and Firefox 3.5b5pre.

Changed in firefox (Ubuntu):
status: New → Incomplete
Revision history for this message
In , skybon (skybon-deactivatedaccount-deactivatedaccount) wrote :

Why don't the parser just ignore the XML version and parse the file like XML 1.0?

Revision history for this message
teta (velten) wrote : Re: firefox can't parse xml 1.1 documents

All Firefox Versions have this bug. There is no special Ubuntu bug.

Look at:

https://bugzilla.mozilla.org/show_bug.cgi?id=233154

Revision history for this message
In , Mozilla-bugs-micahscomputing (mozilla-bugs-micahscomputing) wrote :
Revision history for this message
Micah Gersten (micahg) wrote : Re: firefox can't parse xml 1.1 documents

Moving to Firefox 3.5 as Firefox 2 is no longer supported and Firefox 3.0 is only receiving security updates.

affects: firefox (Ubuntu) → firefox-3.5 (Ubuntu)
Changed in firefox-3.5 (Ubuntu):
importance: Undecided → Wishlist
status: Incomplete → Triaged
summary: - firefox can't parse xml 1.1 documents
+ Firefox - Add support for XML 1.1
Revision history for this message
skybon (skybon-deactivatedaccount-deactivatedaccount) wrote :

Either add support or make parser parse 1.1 files like 1.0

Revision history for this message
Micah Gersten (micahg) wrote : Re: [Bug 316373] Re: Firefox - Add support for XML 1.1

This bug has been reported to the developers of the software. You can
track it and make comments at:
https://bugzilla.mozilla.org/show_bug.cgi?id=233154

We cannot make a change like this. Mozilla would have to do it. You're
welcome to comment upstream on possible solutions.

Artem Karimov wrote:
> Either add support or make parser parse 1.1 files like 1.0
>
>

Revision history for this message
In , Vyv03354 (vyv03354) wrote :

(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.

Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
In , froggy45 (francisdinh) wrote :

(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!

Revision history for this message
Michael Tsang (miklcct) wrote :

In the XML 1.0 specification, an XML 1.0 parser should parse any XML 1.x documents as XML 1.0
Ref: http://www.w3.org/TR/xml/#xmldoc

Changed in firefox:
importance: Unknown → Wishlist
Revision history for this message
In , 12cool725 (12cool725) wrote :

(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.

Changed in firefox-3.5 (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
In , Annevk (annevk) wrote :

This is not going to happen.

Revision history for this message
In , Bugmail-a (bugmail-a) wrote :

@Anne: any further explanation why? There's more to life (and the Web) than HTML 5, you know.

Changed in firefox:
status: Confirmed → Won't Fix
Revision history for this message
In , Pppx (pppx) wrote :

Till proper explanation

Revision history for this message
In , L. David Baron (dbaron) wrote :
Revision history for this message
In , Bugmail-a (bugmail-a) wrote :

(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?

Revision history for this message
In , Henri Sivonen (hsivonen) wrote :

> 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.

Revision history for this message
In , Alice0775 (alice0775) wrote :

*** Bug 904668 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Christoph Anton Mitterer (calestyo) wrote :

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.

Revision history for this message
In , Pppx (pppx) wrote :

(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?

Revision history for this message
In , Christoph Anton Mitterer (calestyo) wrote :

@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.

Revision history for this message
In , Pppx (pppx) wrote :

You said about major browsers, I don't see any of those in your list

Revision history for this message
In , Christoph Anton Mitterer (calestyo) wrote :

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...

Revision history for this message
In , Zlip (zlip-792) wrote :

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).

Revision history for this message
In , Pppx (pppx) wrote :

(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.

Revision history for this message
In , Vyv03354 (vyv03354) wrote :

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?

Revision history for this message
In , Annevk (annevk) wrote :

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...

Revision history for this message
In , Henri Sivonen (hsivonen) wrote :

If we ever start changing the XML parser, I think we should go all the way to XML5 and not bother with intermediate steps.

Revision history for this message
In , Vyv03354 (vyv03354) wrote :

Bug 501837 is already present for XML 1.0 5th edition.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.