[Standards] About stream namespaces

Robin Redeker elmex at x-paste.de
Mon Mar 19 09:50:39 UTC 2007


On Mon, Mar 19, 2007 at 09:40:25AM +0100, Tomasz Sterna wrote:
> Dnia 19-03-2007, pon o godzinie 07:23 +1100, Daniel Noll napisał(a):
> > > the XML recommendation), the XML parser is allowed to bail out and call
> > > it a 'not-well-formed XML document'.
> > Is it?  I don't know of any parsers which do, and I certainly don't know of 
> > anything in the XML specification which demands that the entire document be 
> > available up-front.  Most parsers will just sit there and do nothing until 
> > they get all the data (which in this situation would never happen, if that 
> > were the only parser reading from the stream.  If you had two parsers and one 
> > of them was making responses, it might be a different story.)
> 
> I seem to be missing your point.
> Where is this discussion going to?
> 
> We do not produce XML documents with XMPP.
> We do not process XML documents with XMPP.
> We've defined so called XML-streaming protocol, that uses an application
> of XML to transport XMPP packets. And these packets are of our interest.

Yes, that is partially my point. That XMPP is NOT XML. And is only
something that looks similar. And can be processed similar.  I agree
completly with you if the term 'application of XML' can be replaced by
'derivation of XML' or 'definition of something that looks similiar to
XML'.

> We happen to use XML technologies, because it has well designed
> extensibility built-in, that is our goal (the X in the XMPP acronym).
> 
> It might be, that an XMPP <stream/> is not a well formed XML _document_.
> So what? It wasn't designed to be.
> You cannot properly parse XMPP with your XML parser? It simply means,
> that it doesn't conform to XMPP requirements. Use another parser, or fix
> yours to be XMPP compliant. "Fixing" XMPP to fit your parser isn't a way
> to go.

I know that noone will change the spec of XMPP 1.0 for this.
And that 1.1 or 2.0 is not on schedule.

> > > Another alternative would be to make a small packet-layer on the tcp stream
> > > which sends packets which look roughly like this:
> > >    -------------------------------
> > >    | packet length header | data |
> > >    -------------------------------
> > > data would contain a fully well-formed XML document and the other side
> > > just needs to parse that well-formed XML document contained in the data
> > > part after it has read the whole packet.
> 
> How is this going to help with anything?
> What is the rationale behind this idea?

The rationale is that you can actually use XML documents to
exchange information, which can be parsed, checked and validated
in a _defined_ manner by _any_ XML parser.


Robin



More information about the Standards mailing list