[Standards] Re: About stream namespaces

Robin Redeker elmex at x-paste.de
Sun Mar 18 15:03:21 UTC 2007

On Sun, Mar 18, 2007 at 03:37:48PM +0100, Alexander Gnauck wrote:
> Korinthenkacker Robin Redeker schrieb:

Right, I nitpick here.

> >The difference, which matters, is that when you read from harddisk you
> >are not forced to process the document before you have read the full
> >file. You are not _forced_ to parse a partial XML document when you read
> >a file.  If you parse it anyway (without special chunked parsing modes
> >which some sophisticated parsers have, which are by no means required by
> >the XML recommendation), the XML parser is allowed to bail out and call
> >it a 'not-well-formed XML document'.
> that's wrong. You do exactly the same with big documents when you parse 
> them with a Sax or pull parser.
> Or do you load a 100MB XML document in a DOM at once?

If I had enough RAM I would do exactly that.
Again: You are not _forced_ to parse a document from the harddrive partial.
But in XMPP you _are_ actually forced.
And this is my whole point.

> >Whoooops, where is the missing closing </stream:stream> tag?
> >
> >I know that after sasl authentication the client is supposed to 'flush'
> >everything. But what travels the wire is still not a well-formed XML 
> >document.
> Thats not a protocol problem but a implementation problem. If your 
> parser has a problem with that then push the </stream:stream> yourself 
> to the parser if you get a socket exception and you are fine.

My point was just to falsify the argument: 'If you capture the
communication you have a XML document.'

The original argument was not: "If you take the data you send to the
socket and repair it, you get a XML document."

Repairing the document is of course possible with hacks.


More information about the Standards mailing list