[
Lists Home |
Date Index |
Thread Index
]
- From: "Lauren Wood" <lauren@sqwest.bc.ca>
- To: xml-dev@ic.ac.uk
- Date: Sun, 1 Nov 1998 08:56:36 -0800
On 31 Oct 98, at 17:31, Rick Jelliffe wrote:
> Henry Thompson wrote:
>
> > The DOM made a serious mistake here in my opinion: it's
> > stranded in no-person's-land between raw and cooked, without being
> > either. It's not cooked, because it gives you EntityReference and
> > CDATA nodes. It's not raw, because it DOESN'T give you character
> > entity references.
>
> CHARACTER REFERENCES
> I think Henry means "numeric character reference", and this is the heart
> of the matter. A numeric character is not an entity, any more than a
> directly-entered character is. It is just an alternative encoding of the
> character, and should be of no more interest to a general API than the
> charset encoding of the document was. (I am putting words into his mouth:
> or does Henry mean the [XMLs4.6] predefined entities?)
This is the reason that the DOM doesn't give you access through
the DOM to the numeric characters. It's perfectly acceptable for the
application to give access if it's necessary for that application, but
the DOM WG, after a *lot* of discussion, decided that the
alternative encodings of a document were not up to the DOM to
decide.
As for CDATA sections and the DOM - we decided that the DOM
could not, in and of itself, decide whether the CDATA section was
purely an escaping mechanism that the application (such as an
editor) could use or not as it chose or whether the CDATA section
had deeper significance. Making CDATA sections nodes means
that the application can choose which is true. If the CDATA section
is simply an escaping mechanism, then the data can be
transformed before being passed to the DOM, in which case the
DOM will never see a CDATA section. Should the CDATA section
have some other significance, the parser can leave it as a CDATA
section and pass it to the DOM, which will respect it.
Lauren
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|