OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Re: Where does the "nothing left but toolkits" mythcome fr

[ Lists Home | Date Index | Thread Index ]

Kurt Cagle wrote:

> used for denoting that section.  I should also point out that CDATA
> sections become almost necessary when dealing with "unsafe" content -
> XML wrappers holding blog feedbacks written by people who don't have
> the first clue about why ampersands in text are bad for your
> application

I would say rather that CDATA sections are dangerously close to solving 
the problem of wrapping unsafe content; close enough that they convince 
people to use them without actually solving the problem. Three issues:

1. They cannot contain ]]>. Therefore the text must be scanned anyway to 
be safe.

2. They cannot contain characters from outside the current character set 
(though this is not really a problem if the document is written in UTF-8 
or another Unicode encoding).

3. They cannot contain most C0 control characters.

Consequently, you can't just take a random chunk of text and throw it in 
a CDATA section. You might as well as use numeric character references 
for this use case, and you'd be less likely to have problems if you did.

Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS