More CDATA questions
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!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format