W3C home > Mailing lists > Public > public-html@w3.org > August 2008

Re: Validating XHTML5 with XML entities

From: Thomas Broyer <t.broyer@gmail.com>
Date: Tue, 26 Aug 2008 23:54:01 +0200
Message-ID: <a9699fd20808261454k9bc9d01o49f79570915b7e11@mail.gmail.com>
To: "public-html@w3.org" <public-html@w3.org>
On Tue, Aug 26, 2008 at 11:36 PM, Jeff Schiller <codedread@gmail.com> wrote:
> The spec states that XHTML5 documents do not require a DOCTYPE [1].
> [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#editors

From the same page (§2.1 Terminology):
"The term HTML documents is sometimes used in contrast with XML
documents to specifically mean documents that were parsed using an
HTML parser (as opposed to using an XML parser or created purely
through the DOM)."

> A DOCTYPE must consist of "<!DOCTYPE HTML>" (case-insensitive) [2]
> [2] http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype

§8.1.1 "The DOCTYPE" is part of §8.1 "Writing HTML documents". The key
words here are "HTML documents" which I have quoted the definition
above: §8.1 (and section §8 more generally) is not about XHTML5 ("XML
Actually, Ian just opened bug 5994

> 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.

XHTML5 is XML, so XML parsing rules apply.

Thomas Broyer
Received on Tuesday, 26 August 2008 21:54:37 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:37 UTC