[Home] [By Thread] [By Date] [Recent Entries]
At 14:28 1999 03 24 -0500, David Megginson wrote: >Bill la Forge writes: > > Again, is anyone aware of why CDATA is preserved by the DOM? > > What was the reasoning behind this decision? Other things, like > > whitespace within an element tag or even attribute order, are not preserved. > > Why then was CDATA? > >I would guess that the DOM WG believed that users of XML editors and >repositories would want to see CDATA section boundaries and comments >survive a round trip in and out of the tools. Personally, I am >extremely skeptical, but I have heard this argument many times from >the employees of the vendors themselves. As such a vendor, I hear this from our customers. When authoring a document, the user may want to know there is a region into which s/he can paste stuff containing < and & characters and know they won't be interpreted as markup. True, the editing application can magically escape them (e.g., <) as part of the paste operation, but what if the user is using Notepad to copy a parsable XML example into an XML document? Having to escape the special characters destroys the ability to have that data remain parsable/validatable at the same time as embedded in the larger document, and that destroys an important reuse/multipurpose feature otherwise available in XML. (Think of a dynamic XML document that allows you to "verify as well-formed" the content of any <sample-xml> element in your tutorial document.) The point is that the user-author inserted the CDATA section for a reason, and they might well want it to stay there. 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...)
|

Cart



