-
lovetox
c14n do i need that in xmpp? do i need to read up on thatß✎ -
lovetox
c14n do i need that in xmpp? do i need to read up on that? ✏
-
flow
I don't think so, although discussions around canonicalization come up once in a while
-
flow
but with stanza routing hops may injecting new elements, modifying or deleted existing ones, it's probably unrealistic that c14n is in any sensible in xmpp
-
lovetox
thanks
-
lovetox
hm
-
lovetox
how does xml:lang inheritence work with websocket?
-
lovetox
as every websocket frame is its own document i guess not at all
-
lovetox
so am i supposed to add xml:lang to every message
-
lovetox
oh wow yes indeed thats how it works
-
lovetox
that breaks everything, now i dont even have a document, just lose elementes ...
-
Zash
Dould have been nice do define a websocket variant without that framing hack
-
MattJ
Yet people rejoiced at finally having framing, at the time
-
MattJ
and consider streaming the hack :)
-
lovetox
its just makes it really hard to abstract over these two different streaming methods
-
lovetox
..
-
flow
maybe that's just another argument to not view the XMPP connection of an endless stream of an XML document, but instead a stream of individual XML elements: the XMPP top level stream elements✎ -
Zash
Hrrrrrrrr
-
Kev
flow: That's more or less what we do in M-Link, turn the document stream into a stream of top level elements. I imagine most things do the same.
-
MattJ
Yes
-
flow
maybe that's just another argument to not view the XMPP connection as an endless stream of an XML document, but instead a stream of individual XML elements: the XMPP top level stream elements ✏
-
lovetox
em ... im not even sure how to do this
-
lovetox
hm
-
lovetox
but then i lose all the nice things the parser does for me
-
lovetox
for example i need then to add jabber:client to all incoming stanzas
-
lovetox
i need to do the same with xml:lang
-
lovetox
if i treat it as a document, the xml parser does this all for me
-
Zash
Maybe you can do like what Prosody does, rewrite the websocket stream into an xmpp stream and parse that as usual
-
lovetox
yes, i plan to add a dummy <root> element
-
lovetox
i can even do <root xml:lang='en'>
-
lovetox
hm no i cant
-
lovetox
every stanza needs to be its own document ..
-
lovetox
ok lets leave websolcket broken for now :D
-
Zash
That does not sound like what prosody does.
-
flow
lovetox, Smack wraps every top-level stream element in a synthesized <stream/> with the relevant attributes set. Since it's only a handful of attributes, it's pretty easy
-
flow
of course, things get a little bit more complicated if you consider e.g. namespace declarations in <stream/>, but that should also be no show stopper
-
Zash
Unless you rewrite `<open/>` into `<stream:stream>` and then feed everything into a normal stream parser
-
flow
Zash, what happens then?
-
Zash
You can pretend it's a normal XMPP stream and parse it as such