[Standards] About stream namespaces
daniel at noll.id.au
Sun Mar 18 00:57:09 UTC 2007
On Sunday 18 March 2007 03:03, Robin Redeker wrote:
> Further does the w3c XML recommendation only speak about 'XML Documents'
> which are (by definition) well-formed.
> Fragmented XML is by definition not well-formed and is not a XML Document.
> => XMPP is basically not-well-formed XML.
> Maybe this is perfectly valid because XMPP calls it 'valid'. But it's
> not valid if you ask the XML recommendation, because it doesn't say
> anything about validness of fragmented XML.
I'm not even sure what people are meaning by "fragmented" here, since it isn't
a standard term in relation to XML...
But the XMPP stream itself is basically well-formed. That is, if you take the
entire stream, it should have a prolog, and one top-level elements with
contained elements where all the start and end tags match up. The fact that
part of the document isn't available to parse yet is completely irrelevant,
as when you parse a file on disk, occasionally a part of the document won't
be available to parse yet either (the difference is that when reading from
disk, you won't have to wait very long for the next chunk of bytes.)
I say "basically", because as soon as you negotiate StartTLS, you've failed
because binary data is not valid in XML. But I guess we're stuck with this
because the only alternative which would retain XML well-formedness would be
to Base64 encode all the TLS data and contain that inside elements. And
clearly that alternative is worse. :-D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the Standards