[jdev] Websockets RFC: stream: prefix required or not?

Hund, Johannes johannes.hund at siemens.com
Tue Feb 3 15:10:12 UTC 2015


Should not, I agree. But evidently, it kinda does. ☺

I do think people were confused by the prefixed example not being equivalent to unprefixed one.
e.g. show both on feature or error as Michael suggested.

Elsewise, the unfortunately growing number of people who are not very familiar with XML  (ohh, JSON, what have you done to the world!) might have wrong take-away from the example.



I agree that the example might be confusing. But the text reads ok for me. Actually the whole section boils down to:
"Just make sure to produce valid XML".

For me this is self-evident and actually shouldn't require further detailed explanation and examples.

Gesendet: Dienstag, 03. Februar 2015 um 13:51 Uhr
Von: "Michael Weibel" <michael.weibel+xmpp at gmail.com<mailto:michael.weibel+xmpp at gmail.com>>
An: "Jabber/XMPP software development list" <jdev at jabber.org<mailto:jdev at jabber.org>>
Betreff: Re: [jdev] Websockets RFC: stream: prefix required or not?
Because the example is confusing (IMHO)<https://tools.ietf.org/html/rfc7395#section-3.3.3>:


   Note that for stream features and errors, there is no parent context
   element providing the "stream" namespace prefix as in [RFC6120], and
   thus the stream prefix MUST be declared or use an unprefixed form:

   <stream:features xmlns:stream="http://etherx.jabber.org/streams">
     <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
   </stream:features>

   -- OR --

   <error xmlns="http://etherx.jabber.org/streams">
     <host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
   </error>

The text is could be better "and thus the stream prefix MUST be declared or use an unprefixed form" and also the example (using twice the features instead of once features & once error). E.g. something like that:


   Note that for stream features and errors, there is no parent context
   element providing the "stream" namespace prefix as in [RFC6120], and
   thus the stream prefix MUST be declared or use an unprefixed form:

   <stream:features xmlns:stream="http://etherx.jabber.org/streams">
     <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
   </stream:features>

   -- OR --

   <features xmlns="http://etherx.jabber.org/streams">
     <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
   </features>


Would help a lot already, I think.

2015-02-03 13:16 GMT+01:00 Florian Schmaus <flo at geekplace.eu>:
On 03.02.2015 12:53, Michael Weibel wrote:
> It looks as if you'd need to use the "stream:" prefix for "features" but
> you shouldn't/mustn't use it for "error".

What makes you think that you need to use a prefix (or String 'stream'
as prefix) when using features?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20150203/b68709fa/attachment-0001.html>


More information about the JDev mailing list