Ubuntu

Firefox - Add support for XML 1.1

Reported by Michael Tsang on 2009-01-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Won't Fix
Wishlist
firefox-3.5 (Ubuntu)
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.

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

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

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

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

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.

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.

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

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

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

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

Look at:

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

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
Artem Vorotnikov (skybon) wrote :

Either add support or make parser parse 1.1 files like 1.0

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

(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

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

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

(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

This is not going to happen.

@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
In , Pppx (pppx) wrote :

Till proper explanation

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

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

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

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

In , Pppx (pppx) wrote :

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

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.

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

Other bug subscribers

Remote bug watches

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