W3C home > Mailing lists > Public > public-html@w3.org > July 2008

Re: [author-guide] Character Entity References Chart

From: Karl Dubost <karl@w3.org>
Date: Tue, 22 Jul 2008 09:45:32 +0900
Cc: public-html WG <public-html@w3.org>
Message-Id: <F744863F-F466-489F-911A-3D9E550FC356@w3.org>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>


Le 21 juil. 2008 à 22:32, Lachlan Hunt a écrit :
> XML requires validating parsers to be used in order to use entity  
> references other than those 5 predefined by XML.

no.

The exact text of XML specification is as follow:


     Note that non-validating processors are not obligated
     to read and process entity declarations occurring
     in parameter entities or in the external subset;
     for such documents, the rule that an entity must be declared
     is a well-formedness constraint only if standalone='yes'.

     -- Extensible Markup Language (XML) 1.0 (Fourth Edition)
     http://www.w3.org/TR/xml/#sec-references
     Fri, 29 Sep 2006 19:08:13 GMT

with a link from "are not obligated" to the following text.

     4.4.3 Included If Validating

     When an XML processor recognizes a reference to a parsed entity,
     in order to validate the document, the processor MUST include
     its replacement text. If the entity is external, and the processor
     is not attempting to validate the XML document, the processor MAY,
     but need not, include the entity's replacement text. If a
     non-validating processor does not include the replacement text,
     it MUST inform the application that it recognized, but did not
     read, the entity.

     This rule is based on the recognition that the automatic inclusion
     provided by the SGML and XML entity mechanism, primarily designed
     to support modularity in authoring, is not necessarily appropriate
     for other applications, in particular document browsing. Browsers,
     for example, when encountering an external parsed entity reference,
     might choose to provide a visual indication of the entity's  
presence
     and retrieve it for display only on demand.

     -- Extensible Markup Language (XML) 1.0 (Fourth Edition)
     http://www.w3.org/TR/xml/#include-if-valid
     Fri, 29 Sep 2006 19:08:13 GMT



>  Without an official DTD, no other references can be reliably used  
> in XHTML 5.  Even if you provide your own custom DTD and DOCTYPE,  
> most browsers don't use validating parsers and so won't be able to  
> dereference the entity references.

That is a false assumption. Browsers *can*, if they implement it,  
deference the *named* entity references.

All that said is a bit useless.
Your work, Lachlan, could be the start of a nice test suite to  
specifically do an implementation report for each user agents and see  
which named entities are supported in text/html AND application/xhtml 
+xml.





-- 
Karl Dubost - W3C
http://www.w3.org/QA/
Be Strict To Be Cool
Received on Tuesday, 22 July 2008 00:46:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:19 GMT