Re: XHTML character entity support

Henri Sivonen wrote:
> On Nov 3, 2009, at 17:06, Shelley Powers wrote:
> 
>> I'm going to focus on the relevant part of this discussion to the HTML
>> WG: there are rules defined for how undefined entities are handled,
>> and these rules defined in the XML specification. There may be some
>> issues of interpretation, but such issues are specific to the XML
>> spec, not the HTML5 spec.
>>
>> As such, no further explanations or additional specifications are
>> necessary in HTML5.
>>
>> Am I correct in this?
> 
> Not in my opinion. If predictably uniform behavior between UAs is wanted
> and if we want to make it non-mysterious for implementors how to
> performantly parse application/xhtml+xml content written for browsers,
> this WG should specify normative entity resolver behavior (i.e. mappings
> from public id and system id pairs onto streams).

I understand to your goal but this is something which shouldn't be
specified in HTML5 spec.

As HTML5 spec doesn't define any DTD for its XML serialization you have
to reference XHTML 1.x DTDs in order to use entities in it. It's
implementation decision how to cope with external DTDs -- you can ignore
them completely, download them always with each request, use XML catalog
for redirecting to local copies of the most common DTDs, use XML catalog
for redirecting to only entity definitions instead of original full DTD,
use custom entity resolver for dtto, ...

I agree that having such possibilities listed somewhere together with a
list of the most common system/public identifiers which should be
recognized by UAs will improve interoperability. But such information is
suitable for separate W3C Note. It has nothing to do with HTML5 spec.

> As a practical matter, if I'm using SAX in Java, I can't get a
> browser-style EntityResolver off-the-shelf as part of a common
> org.apache package. (Or maybe I could but I'm unaware.)

Is there anything you can't handle with XML catalogs:

http://xml.apache.org/commons/components/resolver/

I suppose that example XML catalog which maps known DTDs to just entity
definitions would be nice addition to possible W3C Note I have mentioned
above.

				Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

Received on Wednesday, 4 November 2009 08:57:06 UTC