W3C home > Mailing lists > Public > public-html@w3.org > October 2009

Re: XHTML character entity support

From: Shelley Powers <shelley.just@gmail.com>
Date: Sat, 31 Oct 2009 13:29:36 -0500
Message-ID: <643cc0270910311129t7d95cc2bm6882fc35f34c0245@mail.gmail.com>
To: Alexey Proskuryakov <ap@webkit.org>
Cc: HTML WG <public-html@w3.org>
On Fri, Oct 30, 2009 at 6:10 PM, Alexey Proskuryakov <ap@webkit.org> wrote:
> As noted in
> <http://www.whatwg.org/specs/web-apps/current-work/#writing-xhtml-documents>,
> there is no guarantee that authors can use character entity references such
> as &nbsp; in XHTML, because XML parsers are not required to process external
> DTD subsets. This works in at least Firefox, Safari and Opera, but it's
> depressing that such a major feature is not interoperable per the spec.

Actually it is interoperable -- there is no guarantee that an XML
parser will process an external DTD. What kind of change do you want
to make it interoperable?

> I think that it's important to guarantee that character entity references
> work in XHTML (even when parsing fragments, e.g. with innerHTML - which
> doesn't currently work in Firefox or Safari, and is confusing to authors).

True, named entities don't work with innerHTML with Firefox, Safari,
and Chrome. But numeric references do work, regardless of DTD. One can
use &#163; instead of &pound; with consistent results regardless of
browser, XHTML or HTML, and DTD.

Can we do what you ask and ensure the document will still parse as
XML, without errors? I'm not saying there isn't, I'm not expert in
this stuff. Hopefully you'll get a response in this email list with
how this could be done, because I'd be curious how it would work.

> For obvious performance reasons, it is impractical to ask UAs to utilize
> validating XML parsers, so this guarantee may need to be specified in a way
> that doesn't require full DTD support.
> - WBR, Alexey Proskuryakov

Received on Saturday, 31 October 2009 18:30:17 UTC

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