W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: DOM Level 1 doesn't do everything

From: John Cowan <cowan@locke.ccil.org>
Date: Tue, 18 Aug 1998 12:25:13 -0400
Message-ID: <35D9AAE9.2F7A30AD@locke.ccil.org>
To: DOM List <www-dom@w3.org>
On 1998-07-28, Stephen R. Savitzky wrote:

> The specification clearly states: 
>   EntityReference objects are inserted into the DOM by the XML processor
>   whenever the processor sees a reference to an entity other than the
>   pre-defined character entities in the XML specification. The replacement
>   value, if it is available, will appear in the child list of the
>   EntityReference.
> One might hedge this by saying that the replacement value of an entity is
> ``not available'' to an editor even if it's in the DTD, but that's a pretty
> severe distortion of the spec.  The requirement to replace and re-insert
> character entities is also a pain in the neck.  We're ignoring it, of
> course, in the interests of efficiency, but it's another distortion, and
> another reason our application simply doesn't conform.

Not to worry.  There are no such things as "character entities" in XML.
There are "character references", the "&#nnnn" and "&#xnnnn" things,
but there are no "character entities" that they refer to.

What the above quotation from the DOM WD presumably means is that
references to "lt", "gt", "quot", "apos", and "amp" need not be
treated as Entity objects, but can be incorporated in Text nodes.
Likewise with character references, since they are not references
to entities.

So it's only references to declared parsed entities (and only
internal entities at that, if the reference is still to Attribute

John Cowan	http://www.ccil.org/~cowan		cowan@ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)
Received on Tuesday, 18 August 1998 12:25:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC