|
[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)
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! 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
|
|||||||||

Cart








