Closed
Bug 422735
Opened 16 years ago
Closed 16 years ago
XML parse error on a valid XML file with "xhtml" namespace and "xml" extension
Categories
(Core :: XML, defect)
Core
XML
Tracking
()
RESOLVED
DUPLICATE
of bug 418391
People
(Reporter: jacquetc.mozilla, Unassigned)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9b4) Gecko/2008030317 Firefox/3.0b4 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9b4) Gecko/2008030317 Firefox/3.0b4 A simple valid XML file with namespace "http://www.w3.org/1999/xhtml" causes a Parse Error when loaded from a local file. Reproducible: Always Steps to Reproduce: 1. Consider the following XML file, which is valid XML, and even valid XHTML 1 Strict: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test</title> <link rel="stylesheet" href="abc" /> </head> <body> </body> </html> I proposed this example because it is valid XHTML, but actually the same result can be obtained with the simpler file: <z xmlns="http://www.w3.org/1999/xhtml"> <link rel="stylesheet" href="a" /> </z> 2. Save it in a file with extension "xml" and load it into Firefox Actual Results: Firefox reports a "Parse Error" on this file. However, there is no problem if any of the following is changed: * namespace suppressed * one of the attribute names "rel" or "href" changed * the extension of the file is "html" and not "xml" * the file is not loaded locally, but served through HTTP with Content-Type being text/html, text/xml or application/xml (I tested only these ones) The bug seems to arise also when the XML content is in a Javascript string, and it is parsed with DOMParser::parseFromString(). Expected Results: This files are valid XML, so there should be no parse error. The problem seems to have appeared in Firefox 3 beta 4. I reproduced it on MacOS X and Windows Vista, so it seems to be OS-independent. It seems to break the LiveRC tool on the French Wikipedia <http://fr.wikipedia.org/wiki/Utilisateur:EDUCA33E/LiveRC/Documentation>
Reporter | ||
Comment 1•16 years ago
|
||
Reporter | ||
Comment 2•16 years ago
|
||
I can reproduce this. When I save the attachments locally and open them in current trunk, a parse error appears. Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5pre) Gecko/2008032304 Minefield/3.0b5pre ID:2008032304 The second example may be wrong because "z" is no XHTML element, but the XHTML document should clearly throw no error. It doesn't in Firefox2. (Sorry, I don't know what the right component for this is).
Status: UNCONFIRMED → NEW
Component: General → XML
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → xml
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•