Closed Bug 158222 Opened 23 years ago Closed 22 years ago

Entities in XHTML files cause XML parsing error in Chimera

Categories

(Camino Graveyard :: Page Layout, defect)

PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugmail, Assigned: bryner)

Details

(Keywords: testcase, xhtml)

Attachments

(2 files, 1 obsolete file)

An HTML4-standard entity such as é is rejected by Chimera when its' containing document (accessed via the filesystem) has an extension of [.xml] or [.xhtml], but works when the document has an extension of [.html].
Keywords: testcase
Note that the attached testcase, delivered with a MIME type of application/xml, also fails.
Forgot to mention that it works fine in Mozilla.
Summary: Entities in XHTML files aren't recognized in Chimera → Entities in XHTML files cause XML parsing error in Chimera
Keywords: xhtml
Authors should use UTF-8 or NCRs and not rely on stuff defined in the external subset. How could they know that an user agent with a non-validating non-external-subset-reading parser doesn't come along? Anyway, the way this "works" in Mozilla is that Mozilla uses a catalog of *pseudo*-DTDs. Enabling the same thing in Chimera is probably very easy.
Are you saying that XHTML-conforming user agents are not expected to handle the entity sets listed in Appendix A.2 ([http://www.w3.org/TR/xhtml1/#h-A2])? (I'm not accusing you of being wrong.)
The XHTML specs doen't require the use of a validating XML parser and non-validating parsers aren't required to process the external subset. Therefore, it is unsafe to rely on stuff that is declared in the external subset.
->heikki, how serious is this, and why would it break in Chimera?
Assignee: saari → heikki
As far as seriousness goes, there isn't that much XHTML content on the web yet. But anyone making XHTML pages would be somewhat surpised if entities did not work. Also, this could come up if you have XML files that use XSLT transformations. I think you should fix this for Chimera unless you plan on stripping out our XHTML, MathML, XSLT etc. support from Chimera (no need to have the C++ code there if it doesn't work properly). I think it is far less work to just fix this rather than strip out support that was not meant to be stripped out. As Henri said, we have a hard coded "XML Catalog" (maps public identifier to system identifier, e.g. URL) in nsExpatDriver.cpp (http://lxr.mozilla.org/mozilla/source/htmlparser/src/nsExpatDriver.cpp#187). The code should still be there in Chimera, so I believe it is a packaging problem. For sample packaging, look in mozilla/embedding/config, and especially file "basebrowser-win-sup". Since you have this problem with XHTML I am sure you have it with MathML and SVG as well, so if you build with either of those you must make sure that the resources they need are packaged as well. Where does Chimera packaging happen? I think this should be owned by someone who actually knows how to build Chimera and is able to do it ;)
Confirming that this is simply a packaging problem. The dtd folder is missing from the res folder inside the app bundle. If I copy the dtd folder from Mozilla's res to Chimera's res, character entities are supported in XHTML.
okay, now the question is how big is the DTD folder? :-) ->bryner for owning
Assignee: heikki → bryner
Blocks: 147975
XHTML DTD is about 8kB, MathML 64kB. MathML and SVG also need special fonts and CSS files. Does Chimera include MathML and/or SVG support?
I doubt it. MathML is just now showing up in Fizzilla 1.1 builds. SVG is only available in experimental Win and Linux builds due to that libart licensing bug.
> XHTML DTD is about 8kB, MathML 64kB And these are ASCII strings that probably compress well in the zip. So correctness is worth the few K. Re: fonts, no special packaging action needed at the moment; users are currently prompted of missing math fonts (screenshot: attachment 71830 [details]) and an URL is provided where they can install them.
The Navigator and NavigatorStatic targets lack a "Copy Files" build phase that'd copy ".../dist/Embed/res/dtd/xhtml11.dtd" to "res/dtd" using the "Executables" style of copying.
Keywords: review
bryner, could you please check in if you approve the patch?
The project file was changed in CVS. Attaching a new patch.
Attachment #95116 - Attachment is obsolete: true
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
No longer blocks: 147975
V
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: