OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Is CDATA "structure"?

[ Lists Home | Date Index | Thread Index ]
  • From: Paul Prescod <paul@prescod.net>
  • To: "'xml-dev@ic.ac.uk'" <xml-dev@ic.ac.uk>
  • Date: Thu, 15 Jul 1999 09:00:11 -0500

Tom Otvos wrote:
> 
> 
> So, my question is should CDATA sections in an XML document be considered
> structural, and warrant being displayed in an XML editor, or should they be
> considered more like "parser control" and be silently interpreted in the
> same way that entity encodings are?  Although we cannot change the way the
> current crop of XML editors behaves, it would be nice to know what the
> conventional wisdom *thinks* should be happening.

I'm confident that our XML 1.0 intent was that CDATA sections should be
even less "physical" than entity references. They were just a markup
convenience with no semantic significance. But XML editors are somewhat of
a funny tool category. They are supposed to hide structure from you, "but
not really." The problem is that different authors have different levels
of interest in the details of the encoding. Because of this, the DOM tends
to err on the side of providing more information rather than less. In
other words, it requires the parser to tell the application more than has
historically been the case.

The long and short of it is that I don't think that there is anymore a
real distinction between the "physical" and "logical"aspects of a
document. You need to actually know what your downstream apps will
consider significant. If you don't want to think about your downstream
apps then of course you can just presume that everything is significant. 

The ISO world has a concept of "grove plan." This is a formal declaration
of the sensitivity of a particular application. By applying a grove plan
to a grove (for instance in a grove API or in a query/address) you can
reduce the sensitivity of an application and thus make (e.g.) CDATA and
entity reference nodes disappear. In the W3C world we just hard-code
sensitivity into our APIs and query/addressing languages. So the DOM is
hard-coded to support CDATA and entity references but XPath is hardcoded
NOT to. Yes, that's a little confusing.

If you could apply a grove plan to your text editor then YOU could decide
whether CDATA sections are structural or not for your application.

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

To me programming is more than an important practical art. It is
also a gigantic undertaking in the foundations of knowledge.
	- Grace Hopper

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/ and on CD-ROM/ISBN 981-02-3594-1
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)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS