[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: CDATA by any other name... (was The raw and the cooked)

  • From: "Lauren Wood" <lauren@s...>
  • To: xml-dev@i...
  • Date: Sun, 1 Nov 1998 08:56:36 -0800

the raw and the cooked
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@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.