Re: Validating XHTML5 with XML entities

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 UTC