W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > February 2009

Re: RDFa DTD and HTML character entity

From: Toby A Inkster <tai@g5n.co.uk>
Date: Thu, 26 Feb 2009 09:31:26 +0000
To: public-rdf-in-xhtml-tf@w3.org
Message-ID: <pan.2009.02.26.09.31.26@g5n.co.uk>
KANZAKI Masahide wrote:

> probably because XHTML+RDFa DTD doesn't include HTML character entity
> module (xhtml-charent-1.mod) . XHTML 1.1 DTD driver also lacks this
> module, but curiously, its flat DTD includes this.

What you've got to remember is that browsers aren't validating XML user-
agents. They don't look at the DTD, so theoretically don't support 
entities for XHTML served as application/xhtml+xml at all!

So why does it appear that they do usually support entities? It's a hack. 
They have a built-in, hard-coded list of DTD URIs for which they will 
support a built-in, hard-coded list of entities. The XHTML+RDFa DTD isn't 
on this list, so entities won't work.

Solutions:

1. Serve as text/html;
2. Use numeric character refs; or
3. Persuade browser developers to support XHTML entities in all
   documents served as application/xhtml+xml.

In practise, serving as text/html seems to be the easiest solution.

-- 
Toby A Inkster 
Received on Thursday, 26 February 2009 10:02:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 February 2009 10:02:02 GMT