[Home] [By Thread] [By Date] [Recent Entries]
Bill la Forge wrote: > From: Gavin Thomas Nicol <gtn@e...> > >CDATA sections *are* different from normal text, even if only > >because the author used them. > > 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 can't say why the DOM included CDATA, but I'll hazard a guess and agree with Gavin. If I'm using a CDATA section, it means that I really, really, really don't want what's in the section to be parsed and it would be a royal pain for me if it was. (Think about writing an HTML tutorial.) The obvious place where preservation of CDATA is important, then, is when I'm co-authoring a document with a friend who uses a DOM-based editor while I prefer a text editor. If every time my friend edits the document all the CDATA sections get wiped out, neither our friendship nor our co-authorship are going to last very long. This is quite different from whitespace in element tags and attribute order, which are more aesthetic concerns than practical ones. I might be a bit annoyed if my friends editor rearranges these, but I am unlikely to go looking for new partners because of it. -- Ron Bourret 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



