[Standards] <[CDATA[ in XMPP

Robin Redeker elmex at x-paste.de
Mon Jul 30 23:34:39 UTC 2007


On Mon, Jul 30, 2007 at 06:16:24PM -0500, Mickael Remond wrote:
> Hello,
> 
> Regarding this discussion, it seems that the topic started about the use
> of CDATA.
> So, we are talking about way to escape characters in an XML stream. My
> view is that all way to escape characters are good, especially when they
> are defined in XML, cited in XMPP RFC and are simple to implement (and
> implemented by all parsers I know).
> 
> I have tested the use of CDATA for example with Psi, Gajim and a few other
> clients and all of them were fine.
> As Peter said, it should probably be allowed if not explicitely forbidden.
> 
> My view is that it should be allowed as, as I understand it, it is just
> one of the possible way to escape characters (and not the worst one).

I've been reading the XMPP RFC with an eye on exactly CDATA, and it says
clearly that CDATA is allowed.

   An XML stanza exists at the direct child level of the root <stream/>
   element and is said to be well-balanced if it matches the production
   [43] content of [XML].

See in the XML spec:


   [43]    content    ::=
      CharData? ((element | Reference | CDSect | PI | Comment) CharData?)*

CDSect is a CDATA Section. And the RFC3920(bis) doesn't say anything
about excluding it.


R



More information about the Standards mailing list