Re: XHTML character entity support

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

Shelley

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