[Standards] <[CDATA[ in XMPP
textshell-E19442 at neutronstar.dyndns.org
textshell-E19442 at neutronstar.dyndns.org
Tue Jul 31 03:24:57 CDT 2007
On Mon, Jul 30, 2007 at 07:33:41PM -0700, Rachel Blackman wrote:
> >CDATA is purely XML level and doesn't carry any semantic meaning.
> >And yes, the normal compliant XML parser doesn't even bother to tell
> >you how the data was encoded in the byte stream.
> >You are seriously confusing layers here.
>
> Fair enough that I shouldn't have used spaces as the example; you're
> right that it's invalid, and I simply grabbed it as the sample due to
> the JID escaping thing.
>
> JID escaping has, however, been put forward as a method of escaping
> characters to get them across the wire. I think I am failing to get
> my point across clearly, so I will try one last time. What I've been
> trying to address is, for instance:
>
> >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).
>
> Read that carefully. "All way to escape characters are good."
>
> If we are viewing CDATA as 'one more way to escape characters,' then
> we need to think about the implications. Because I will /guarantee/
> you that if we recommend CDATA as an escaping method, then someone
> will do a <![CDATA[john&mary at family.org]]> in an <item/> value, or
> whatever.
>
same as if they'd send john&mary at family.org...
The xmpp spec assumes you grok xml. There is no point in reexplaining
xml basics because someone might get them wrong.
It's not a tutorial....
Do you really expect people that don't get the basics of xml right, don't
have bigger problems implementing xmpp?
And IMHO people that work without understanding just trial-and-error
until it works, they don't bother reading the spec details.
And i expect all the major servers to get this right, because they
use xml parsers that are xml compliant¹...
- Martin H.
¹ you can't get it wrong using a compliant parser without heavyly
hacking around huge cluebats.
More information about the Standards
mailing list