- From: David Carlisle <davidc@nag.co.uk>
- Date: Fri, 18 Jan 2013 20:30:46 +0000
- To: Maciej Stachowiak <mjs@apple.com>
- CC: public-html@w3.org, Henri Sivonen <hsivonen@iki.fi>
On 18/01/2013 19:40, Maciej Stachowiak wrote: > Can you give a specific example? In particular, URL to a piece of > existing content that broke, and browser and version that used to > process it as intended before adopting the HTML5 spec rules? > I've given examples in the bug reports and in the referenced extension spec, as I mentioned in the message to which you are replying the most glaringly obvious example is that it broke the MathML2 specification which was the source of these entity definitions in the first place. (And of course broke any document that used that set-up as a template). http://www.w3.org/TR/MathML2/chapter3.xml Is rejected as not well formed by any browser following the current HTML draft (but see below). It was not only parsed as a well formed document but rendered as XHTML+MathML in every version of Netscape/Mozilla/Firefox up to Firefox 3 and every version of Internet Explorer (up to at least 9) Of course IE without MathPlayer does not render the MathML part but with it it does and this report is only concerned with parsing. Since webkit browsers have only had MathML support very recently (within the last few days in the case of Chrome) IE/Firefox was the overwhelmingly important browser base for MathML usage at the time of the publication of MathML2. > My understanding was that the HTML5 spec rules just matched what > essentially all browsers already did for XHTML/XML parsing. That couldn't be more wrong unfortunately. IE simply used (uses?) the System ID and fetches the DTD as specified (as far as I can tell). So parsing The MathML2 spec worked because it parsed the MathML2 dtd. Firefox in addition to a list of PUBLIC IDs similar to the list in the HTML(5) spec would trigger loading its copy of the entity definitions if the SYSTEM URL of the DTD included the string "mathml" (or maybe the last component was exactly "mathml" I don't recall, in any case the SYSTEM URL of "mathml.dtd" used in that document was sufficient. This means that if the HTML spec was fixed as proposed by this extension spec. You could use the form that is suggested in the extension spec, namely <!DOCTYPE PUBLIC "-//W3C//ENTITIES HTML MathML Set//EN//XML" "mathml.dtd"> <html> .... where "mathml.dtd" is in general a URL to a copy of the entity set. That would work in standard XML tools. It would work in IE It would work in Forefox up to version 3 Sorry not sure what older webkit based browsers or Opera would do. Sadly (and this is the danger that Henri highlighted) it would not work with systems that follow the current html(5) spec (although that is apparently just firefox). That is unfortunate but it is made more so by the fact that this bug has been ignored for 2 years while implementations implementing the broken spec have been distributed. In practice the current situation between browsers and xml tools is so incompatible that it is not safe to use entities at all, so if we fix the implementations to support this then it may take a while before documents for general use can use it but that is true of any new feature. > If that's not the case, it would be useful new information to know > the details. Using the above URL to MathML2 chapter 3, and using Windows implementations I have to hand: Firefox 21 (Nightly) rejects the document with an undefined entity error. (this is the worst possible user experience but is teh behaviour specified by HTML5) IE 9 parses it and renders the HTML parts Opera 12 parses it renders it (including the MathML) using its CSS MathML implementation Chrome dev 26 Parses and renders the document including MathML parts safari 5 Parsers and renders the document including MathML parts So as far as I can see _only_ Firefox gives a fatal error XML Parsing Error: undefined entity Location: http://www.w3.org/TR/MathML2/chapter3.xml Line Number 2123, Column 8: David
Received on Friday, 18 January 2013 20:31:19 UTC