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 ]

On Mon, 2005-02-07 at 06:37 -0500, Elliotte Harold wrote:
> 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.

I know most people on this list know this, but because the above is a
good reference post, I wanted to clarify that using numerical characters
references does not solve #3.

I've always been of two minds about the fact that XML makes representing
some Unicode characters impossible without heavyweight encoding methods
such as base64.  Being one of the text gang (as opposed to the data
gang), I understand the motivations here, but I also think that if XML
provided some consideration to cover all Unicode characters, it would
make life easier for everyone.

Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Use CSS to display XML - http://www.ibm.com/developerworks/edu/x-dw-x-xmlcss-i.html
Introducing the Amara XML Toolkit - http://www.xml.com/pub/a/2005/01/19/amara.html
Be humble, not imperial (in design) - http://www.adtmag.com/article.asp?id=10286
Querying WordNet as XML - http://www.ibm.com/developerworks/xml/library/x-think29.html
Manage XML collections with XAPI - http://www-106.ibm.com/developerworks/xml/library/x-xapi.html
Default and error handling in XSLT lookup tables - http://www.ibm.com/developerworks/xml/library/x-tiplook.html
Packaging XSLT lookup tables as EXSLT functions - http://www.ibm.com/developerworks/xml/library/x-tiplook2.html


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

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