CDATA Section Support (was RE: SAX2 RFD: LexicalHandlerdraft v.1.1)

Paul Prescod paul at prescod.net
Thu Mar 25 18:06:58 GMT 1999


Tim Bray wrote:
> 
> At 10:13 PM 3/24/99 +0100, Ronald Bourret wrote:
> >I wasn't even going to reply, but then I remembered that the real question
> >here is whether SAX (not the DOM) should tell people about CDATA sections.
> > I think the answer is yes.
> 
> The implication is that a parser that doesn't pass on word of CDATA
> sections is a second-rate parser.   Hrummph.  

It isn't second-rate it is probably just optimized for speed instead of
fidelity.

> Is this not a slippery-
> slope that puts us on the road to reporting whether single or double
> quotes were used for attribute values? -Tim

The way to avoid the slippery slope is to define an information set. Had
the information set been defined before the DOM (or, even better, before
XML 1.0 went to REC) then the DOM creators would have known what the right
answer is. In this case they were forced to guess and IMHO they guessed
wrong.

Lesson: Information sets should follow close on the heals of syntactic
standards or should be incorporated into the syntactic standards. RDF gets
this right. Will XLink? What about future versions of CSS?

Also: Different types of applications need different amounts of
information. Therefore an information set should support different levels
of granularity. The groves model does this through "grove plans." Some
parsers provide grove plans that allow a character-for-character
round-tripping. Others provide what we used to call "ESIS."

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

"Perpetually obsolescing and thus losing all data and programs every 10
years (the current pattern) is no way to run an information economy or
a civilization." - Stewart Brand, founder of the Whole Earth Catalog
http://www.wired.com/news/news/culture/story/10124.html

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list