- From: Simon Pieters <simonp@opera.com>
- Date: Fri, 02 Sep 2011 09:11:30 +0200
- To: public-html-comments@w3.org, "John Boyer" <boyerj@ca.ibm.com>
On Fri, 02 Sep 2011 01:03:08 +0200, John Boyer <boyerj@ca.ibm.com> wrote: > Dear Working Group, > > In Section 8.1.1 of [1], the allowable DOCTYPE declarations for HTML5 are > given. There is a highly recommended shortest version as well as some > legacy and obsolete alternatives. However, none of the alternatives seem > to allow an author to define entities to be used within the document. Is > this intentional or an oversight? > > [1] http://www.w3.org/TR/html5/syntax.html#the-doctype It is intentional. Note that this section only applies to text/html content. > As an example, it seems that an internal dtd subset that looks like this > should be admissible: > > <!DOCTYPE html [ > <!ENTITY ent "Big mobile tree"> > ]> > > Which would then allow &ent; to be used in the HTML content. The HTML parser does not support this. > Particularly for the XML syntax variant served out under application/xml > or application/xhtml+xml, it seems it would be challenging to turn off > the > ability to define and use entities as the mechanism is built into the > underlying XML parser. It is allowed in XML (see the section "The XHTML syntax"). > However, I am asking specifically about whether > the above declaration is also allowed in non-XML content served as > text/html? No. -- Simon Pieters Opera Software
Received on Friday, 2 September 2011 07:12:16 UTC