W3C home > Mailing lists > Public > public-html-comments@w3.org > September 2011

HTML5 DOCTYPE and ENTITY declarations

From: John Boyer <boyerj@ca.ibm.com>
Date: Thu, 1 Sep 2011 16:03:08 -0700
To: public-html-comments@w3.org
Message-ID: <OF7F7C6D3D.D200BEF0-ON882578FE.007CA195-882578FE.007EA8EC@ca.ibm.com>
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

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.

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.  However, I am asking specifically about whether 
the above declaration is also allowed in non-XML content served as 
text/html? 

Thanks,
John M. Boyer, Ph.D.
Distinguished Engineer, IBM Forms and Smarter Web Applications
IBM Canada Software Lab, Victoria
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: 
http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw
Received on Thursday, 1 September 2011 23:03:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 1 September 2011 23:03:56 GMT