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

More CDATA questions

  • From: roddey@u...
  • To: xml-dev@i...
  • Date: Wed, 16 Jun 1999 15:43:20 -0600

cdata content



This has probably been dealt with somewhere else, but I don't remember it right
off hand so I'll ask at the possibility of being redundant... Glenn brought this
up and we didn't have any really feeling for the answer (other than what we
guesstimated.)

Is CDATA effectively the same as an entity reference except that its in place?
I.e. is it basically just a blob of text which, once seen will have the
bracketting gorp removed and the characters will be taken as character data of
the enclosing element?

Part of the reason for this question is to straighten out a possible ambiguity
in our parsers. We have an ignorable whitespace callback and a characters
callback on the document handler. Each of them has an 'isCDATA' parameter that
indicates whether the chars/ws being passed out in the event came from a CDATA
section or not.

So, if I see this:

<foo>
   <![CDATA[     ]]>
</foo>

should the spaces inside the CDATA be treated as either ignorable whitespace or
characters according to the normal processing rules for a CHILDREN element? Or
is there any way in which the content of the CDATA section would be treated
differently? Would, for instance, it always be considered characters because its
not just 'accidental whitespace'? Its obviously not just whitespace that happens
to be in the content of the element, it was purposefully put into the element
content to be treated 'as is'. OTOH, this would be technically illegal if it
were treated as anything besides ignorable whitespace because the content model
is CHILDREN.

I guess part of the question is that are the contents of CDATA sections REALLY
not passed judgement on, as you would think from the spec, or are they just KIND
OF NOT REALLY passed judgement on? If you really just take the CDATA content as
is, then you really shouldn't have to find out if they are all whitespace and
deal with the validity issues of the content model. But, if you don't, then they
could put non-ws characters in the content model of something that had CHILDREN
or MIXED models.

Am I making any sense here? :-)



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