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

Re: Validating XHTML5 with XML entities

From: Robert J Burns <rob@robburns.com>
Date: Wed, 27 Aug 2008 10:04:33 +0300
Cc: "HTML WG" <public-html@w3.org>
Message-Id: <5A710FC2-9DBA-4F66-9D62-D4B61F347CF9@robburns.com>
To: "Jeff Schiller" <codedread@gmail.com>

HI Jeff,

On Aug 27, 2008, at 12:36 AM, Jeff Schiller wrote:

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

Ideally, HTML5 will require XHTML5 UAs to support HTML character  
references without any entity declarations. Several in the WG  
expressed their opposition to such a norm, but have shown no research  
nor provided any arguments to support their assertions. I think they  
may just misunderstand the XML recommendation.

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

Can't you have WordPress emit U+00A0, or are you using a charset  
encoding other than a UTF encoding.

Take care,
Rob
Received on Wednesday, 27 August 2008 07:05:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:22 GMT