# [webkit-dev] HTML5 & MathML3 entities

Maciej Stachowiak mjs at apple.com
Sat Jul 10 04:49:19 PDT 2010

On Jul 10, 2010, at 3:47 AM, Sausset François wrote:

> I'm currently working on the MathML3 implementation and I noticed that new XML entities have been defined by the W3C:
> http://www.w3.org/TR/xml-entity-names/
>
> They are supposed to be used by both HTML 5 & MathML 3.
>
> I would like to include them in WebCore/html/HTMLEntityNames.gperf.
> However there is one conflict with the existing XHTML 1.0 entities: \rangle (and \langle) doesn't point to the same Unicode character in XHTML 1.0 and HTML 5 entity definitions.
> For instance, U+27E9 ("⟩") instead of U+3009 ("〉").
>
> There are two possibilities:
> - either update WebCore/html/HTMLEntityNames.gperf and overwrite the two conflicting cases with the new standard, but it won't respect the XHTML 1.0 specification anymore.
> - or use two sets of HTML entities depending on the DTD of the document. It would be the cleanest way, but I don't know how to make WebCore handle two such sets.
>
> I think the best solution is the second one, but I'll need help to make WebCore handle two entity sets and switch depending on the DTD. It is outside of my present skills.

Go with the HTML5 / MathML 3 definitions for everything. Our XHTML implementation targets XHTML5, not XHTML 1.0.

Regards,
Maciej