Validating XHTML5 with XML entities

The spec states that XHTML5 documents do not require a DOCTYPE [1].

A DOCTYPE must consist of "<!DOCTYPE HTML>" (case-insensitive) [2]

But a DOCTYPE is also where you declare XML entities.  For instance,
my blog software emits &nbsp; so I added an XML entity at the top of
my pages:

<!DOCTYPE html [
  <!ENTITY nbsp "&#160;">
]>

Doing this seems to prohibit me from being able to generate valid
XHTML5 (at least the experimental portion of the W3C validator that
was recently added - html5.validator.nu does not complain).  Or maybe
XHTML5 is XML entites (among other things)?  Or maybe the DOCTYPE
definition could be expanded to optionally allow XML entities?

I'd appreciate some insight.  Yes, I can continue to hack on WordPress
and get it to emit "&#160;" instead of "&nbsp;" and then go through my
database and replace all instances for the last several years, but...

Thanks,
Jeff Schiller

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#editors
[2] http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype

Received on Tuesday, 26 August 2008 21:36:53 UTC