[Standards] <[CDATA[ in XMPP

Jacek Konieczny jajcus at jajcus.net
Tue Jul 31 13:36:13 UTC 2007

On Tue, Jul 31, 2007 at 05:22:50PM +0400, Sergei Golovan wrote:
> The main mistake you did (and probably the only mistake, because CDATA
> is indeed a valid XML construct) is that you BREAK THINGS.
> Since NO software used CDATA before 

Are you sure? Some people use existing XML libraries. Those could
generate CDATA in some cases -- e.g. only in some specific situations or
after XML library upgrade (valid optimisation of XML serializer). Such
software, even if very uncommon, is valid!

> there's certainly some which will break.

Some time ago jabberd (the only available then) passed around non-UTF8
characters. That was not valid XML handling. And most clients (all two
;)) didn't mind. Then jabberd was fixed, when developers of new clients
wanted to use a standard XML parsers, which fail on such input. Fix in
jabberd caused the clients which generated invalid XML to disconnect. 
So existing clients where "broken" because someone wanted better XML
handling in their new clients... Was that wrong? Should the new clients
hack the input or the parser to handle invalid characters?

With CDATA it is a very similar situation.

> I don't know about others but personally I don't like uncertainty and
> I don't like to search over the software after upgrade to find why it
> stops working.

Any software using a third-party, standard compliant XML generator may
start generating CDATA sections at any moment. And that will not be 
a bug in a XML library!


More information about the Standards mailing list