XSF Discussion - 2022-04-07


  1. Daniel

    goffi: as a module to an existing server?

  2. Daniel

    any source code I could look at?

  3. goffi

    > goffi: as a module to an existing server? As a component with my pubsub component. No code published yet, I'm updating XEP-0356 implementation in it and Prosody first.

  4. Guus

    does the specs allow for (non-namespaced) attributes to be added to message/iq/presence stanza elements?

  5. Guus

    `<message foo='bar' ... `

  6. Zash

    Yes officer, this message right here ↑

  7. Zash

    Guus, have fun with the protocol police 😉

  8. Link Mauve

    Woop woop~

  9. jonas’

    Guus, most certainly not

  10. mjk

    Meanwhile, in Matrix: -- This is not the protocol violation you're looking for *waves hand, making the protocol support it* -- Woah...

  11. jonas’

    use namespaced attributes, they're there for that use case

  12. Zash

    or stuff it in a namespaced element

  13. jonas’

    or that, but you can't do that for IQs

  14. Kev

    Please don't shove new stuff in a stanza header, I would expect most of the world to break in that case.

  15. Zash

    I expect half the world to pass it along to the other half, where it'll break.

  16. jonas’

    one half being prosody, the other half being ejabberd?

  17. Guus

    I'm asking because I was amazed that I'm looking at client traffic that does it, without it breaking in dramatic ways.

  18. Guus

    are _namespaced_ attributes on those elements even ok?

  19. Kev

    Not really.

  20. Zash

    Slightly less not okay at least.

  21. Kev

    We're bad at documenting our extension points, though.

  22. Zash

    It's XML! Everywhere's an extension point if you namespace it!!

  23. Guus

    You'd need to somehow add the namespace to the ... stream element? Feels pretty messy.

  24. Guus

    So, yeah, shove it in a child element somewhere.

  25. Guus

    to make you share in my misery, I'm looking at an attribute on a message stanza that starts with this:

  26. Zash

    no no noooooooo

  27. Guus

    `sensorList="{&quot;data&quot;:[{&quot;type&quot;:&quot;sensorOne&quot;,` followed by slightly over 2000 characters

  28. Guus

    and that's just one of those attributes. :D

  29. Kev

    JSON inside a default-namespaced attribute on a message stanza. I don't see what could possibly go wrong.

  30. Guus walks out of the bar, whistling.

  31. Zash fills eyes with kerosene

  32. Kev

    Really, what's the odd Eldrich Horror between friends?

  33. Maranda huhus.

  34. Kev

    Really, what's the odd Eldritch Horror between friends?

  35. Guus

    but as I said: this doesn't break, apparently.

  36. Kev

    I think you've just not found the myriad places it breaks, yet :)

  37. jonas’

    Guus, no you don't, you can <message xmlns:foo='bar' foo:fnord='xyz'/>

  38. jonas’

    Guus, no you don't have to declare it on the stream header, you can <message xmlns:foo='bar' foo:fnord='xyz'/>

  39. Guus

    jonas’ ah yes. Still not a good idea probably.

  40. Guus

    Kev: let me put it this way: it's running in production, but they're now reaching out because of some issues.

  41. Kev

    Oh, I'm happy to believe that given some controlled subset of software it might work. Just that I would expect it to break in the general case.

  42. Zash

    Guus, show them https://xmpp.org/extensions/xep-0432.html

  43. Guus

    (also: hardcoded stanza IDs)

  44. Guus

    Zash: but it has a big red warning on top of it! must be worse than rolling our own!

  45. Guus

    (should we make those warnings slightly less off-putting by renaming them to 'beware' and print them in a color that's not firetruck-orange?)

  46. Zash

    Guus: Or push for advancement?

  47. jonas’

    this sounds like a low-hanging push-for-advancement fruit indeed

  48. Guus

    Zash we can do that for individual XEPs - I was trying to go for a more generic approach.

  49. Zash

    I think I even added that to mod_rest

  50. Guus

    RFC6121 8.4 explicitly states that 'extension attributes' _are_ allowed, I think. See https://datatracker.ietf.org/doc/html/rfc6120#section-8.4

  51. Zash

    Is now the time to remember how the `@c` attribute in `<a xmlns="b" c="d"/>` isn't in the "b" namespace?

  52. Guus

    XML prefixes

  53. Guus

    as jonas showed earlier.

  54. Zash

    Like `xmlns:extension="blah" extension:attr="moo"`, yeah that's fine.

  55. Guus

    `xmlns:prefix="uri" prefix:c="yey"`

  56. Guus

    yeah, exactly.

  57. Kev

    Guus: Yes, it does. I predict it would still break things.

  58. MattJ

    It will break broken things

  59. Kev

    Sure. Whereas doing it inside jabber:client will break unbroken things.

  60. jonas’

    nobody proposed doing it in jabber:client

  61. jonas’

    which I'm sure will cause fun effects :D

  62. Kev

    That's exactly what the sample Guus pasted was doing.

  63. jonas’

    no

  64. Kev

    Nobody was proposing it was a good idea, naturally.

  65. jonas’

    in <message xmlns="jabber:client" foo="bar"/>, @foo is *not* in the jabber:client namespace.

  66. Kev

    Ok, default namespace, yes.

  67. jonas’

    no

  68. jonas’

    without namespace.

  69. Zash

    Let's just pretend it's in jabber:client plz

  70. jonas’

    <message xmlns="jabber:client" xmlns:jc="jabber:client" jc:foo="bar"/> is in jabber:client then.

  71. jonas’

    and it is semantically different from the former

  72. Zash

    That's what all code I have ever known does

  73. jonas’

    so please let's not pretend that

  74. Kev

    I know what I mean, even if I'm not using the right terms for it.

  75. Link Mauve

    Dino’s internal representation does the wrong thing here. :<

  76. Zash

    This is a silly part of XML

  77. Kev

    I do know that attributes without a namespace live outside, although I always miscall 'no namespace' 'the default namespace'.

  78. moparisthebest

    > in <message xmlns="jabber:client" foo="bar"/>, @foo is *not* in the jabber:client namespace. so every websocket implementation ever is broken ?

  79. Kev

    No, I don't believe so.

  80. jonas’

    moparisthebest, why?

  81. jonas’

    moparisthebest, the attributes on stanzas in XMPP are supposed to be in no namespace

  82. Kev

    The attributes in XMPP are in the null-namespace, whatever the right term is.

  83. moparisthebest

    oh, ok then

  84. Zash

    But they ... belong with the whatever namespace xmlns specifies, somehow

  85. moparisthebest

    this hurts my brain and I do not like it

  86. Zash

    Yes. Let's pretend this obscure corner of XML doesn't exist!

  87. Kev

    Everyone pretends they live in the jabber:client/jabber:server namespaces because that's what XML would do if it wasn't insane.

  88. Kev

    But they're not.

  89. Zash

    We're really using XmppML anyways 😉

  90. Kev

    Really all the attributes in XMPP should have been namespaced, but that would have been hideous.

  91. moparisthebest

    I'm all for going back to pretending it worked the way I always thought it worked

  92. MattJ votes for that plan

  93. jonas’

    moparisthebest, what do you do on `<message xmlns="jabber:client" xmlns:jc="jabber:client" jc:foo="bar"/>` then?

  94. jonas’

    moparisthebest, what do you do on `<message xmlns="jabber:client" xmlns:jc="jabber:client" jc:foo="bar" foo="baz"/>` then?

  95. moparisthebest

    honestly I have no idea

  96. moparisthebest

    reject whatever made it as bad software? :)

  97. jonas’

    :(

  98. Zash

    redirect whoever made the software to an insane asylum perhaps?

  99. moparisthebest

    up until 2 minutes ago I would have said that's a duplicate attribute, both under jabber:client

  100. Kev

    Sometimes being wrong is the better option :)

  101. moparisthebest

    so to be clear, any attribute that doesn't have an explicit `namespace:` in front is *not* in a namespace at all ?

  102. Zash

    apparently

  103. moparisthebest

    ever, regardless of higher level namespaces ?

  104. Zash

    so like `(null):attr=""`

  105. Zash

    I'm not about to read the XML specification.

  106. moparisthebest

    :mind-blown:

  107. Kev

    I believe that to be correct, yes, although it's a while since I checked in the spec and I might misremember.

  108. Kev

    It's a bit like Dialback. You understand it, you go to sleep, and you instantly forget how bad it really is, to protect yourself.

  109. flow

    maybe there is a good reason why non-qualified attribute names are in a namespace without value?

  110. flow

    what's again the difference between xep432 and xep335?

  111. flow

    ahh ep432 builds upon xep335

  112. jonas’

    moparisthebest, https://www.w3.org/TR/REC-xml-names/#defaulting

  113. jonas’

    > Default namespace declarations do not apply directly to attribute names; the interpretation of unprefixed attributes is determined by the element on which they appear.

  114. jonas’

    > The namespace name for an unprefixed attribute name always has no value.

  115. jonas’

    (namespace name == namespace URI in more common lingo)

  116. jonas’

    The second example in https://www.w3.org/TR/REC-xml-names/#uniqAttrs here is the "adversarial" example we talked about earlier, with xmlns="x" xmlns:prefix="x" and attributes with and without prefix on the same element being legal

  117. jonas’

    The second example in https://www.w3.org/TR/REC-xml-names/#uniqAttrs is the "adversarial" example we talked about earlier, with xmlns="x" xmlns:prefix="x" and attributes with and without prefix on the same element being legal

  118. wurstsalat

    hi! I would like to attribute autor(s) of the XMPP logo: https://commons.wikimedia.org/wiki/File:XMPP_logo.svg Who should I attribute this to? "XMPP Standards Foundation", "Raja SANDHU" (as the original author), all of the authors who modified the logo, or all of the above?

  119. ralphm

    wurstsalat: I think Raja Sandhu first, and XSF second. I don't think that the cosmetic fix was actually "authored", but instead working around an SVG rendering artifact.

  120. moparisthebest

    > Default namespace declarations do not apply directly to attribute names; the interpretation of unprefixed attributes is determined by the element on which they appear. wait, what? later it says: > the default namespace does not apply to attribute names the first seems to say that default namespace declarations apply to attribute names *sometimes* ?

  121. wurstsalat

    ralphm, thank you!

  122. Link Mauve

    moparisthebest, no, it means that it applies to the element, which incidentally defines which attributes are accepted and how to interpret them.

  123. jonas’

    unnamespaced attributes inherently belong to the element, and how to interpret them is at the elements discretion

  124. moparisthebest

    Link Mauve, still not understanding, if an attribute doesn't have a prefix, does it ever have a namespace ?

  125. jonas’

    moparisthebest, no.

  126. Link Mauve

    moparisthebest, never.

  127. jonas’

    otherwise, the second example from that uniqAttrs anchor would not universally be valid

  128. Link Mauve

    In <a xmlns='http://www.w3.org/1999/xhtml' href='/'/> and in <a xmlns='http://www.w3.org/2000/svg' href='/'/>, both @href are in the null namespace but both are defined by their parent element(’s namespace).

  129. Link Mauve

    (The latter is an addition in SVG2, it would usually be in the http://www.w3.org/1999/xlink namespace.)

  130. moparisthebest

    so a namespace for an element decides which non-namespaced attributes it can have on it ?

  131. moparisthebest

    s/non-namespaced/null-namespaced/

  132. Link Mauve

    Of course, since it defines the element.

  133. jonas’

    no, the element decides which non-namespaced attributes it can have on it

  134. jonas’

    indirectly, the element decides which non-namespaced attributes it can have on it

  135. moparisthebest

    I think I understand this now, thanks

  136. moparisthebest

    I don't understand in what universe this makes sense though, so if anyone wants to help with that...

  137. Link Mauve

    moparisthebest, it allows different namespaces to define their elements (and the allowed attributes on them) without fear of incompatibility with another unknown namespace defining the same elements and attributes but with a different meaning.

  138. jonas’

    Link Mauve, but that would still work if attributes worked the same way as elements

  139. jonas’

    however, it allows namespaces to define attributes which have a meaning independently from the element they appear on

  140. Link Mauve

    Right.

  141. jonas’

    if the namespace of an attribute was defaulted to the one of the element, all attributes which are used on *any* element in that namespace can not be used generically (in the way xlink:href or xml:lang is used generically)

  142. jonas’

    though I think that this particular trade-off is not worth the headaches it causes

  143. jonas’

    as namespace URIs are cheap

  144. Link Mauve

    We have no way to go back in time and change XML 1.0 + Namespaces anyway.

  145. Link Mauve

    No known* way.

  146. moparisthebest

    unfortunately this feels like proof that time travel is impossible

  147. moparisthebest

    surely if it was, someone would have fixed this first

  148. Guus

    > if the namespace of an attribute was defaulted to the one of the element, all attributes which are used on *any* element in that namespace can not be used generically (in the way xlink:href or xml:lang is used generically) Ironically, I have never seen the latter without that prefix.

  149. Link Mauve

    Guus, XML 1.0 + Namespaces forbids redefining the namespace of the xmlns or xml prefixes.

  150. Guus

    Link Mauve: but if I read the above correctly then any element can define the usage of that attribute without explicitly requiring the namespace prefix?

  151. Link Mauve

    Guus, “that attribute”, the @xml:lang?

  152. Link Mauve

    It already has a prefix, which is xml, and is illegal to redefine or to define anything to the same namespace.

  153. Guus

    Link Mauve: I misinterpreted jonas’ earlier comment.

  154. flow

    > jonas’> if the namespace of an attribute was defaulted to the one of the element, all attributes which are used on *any* element in that namespace can not be used generically why shouldn't I be able to use the attribute with a prefix in an element not beloging to the namespace the attribute was defined in?

  155. Link Mauve

    flow, conceptually, an attribute only refines its element.

  156. Link Mauve

    It wouldn’t make any sense to use e.g. the XHTML video/@loop on an XMPP message/body.

  157. Link Mauve

    It would make sense to include an XHTML video element in an XMPP message though.

  158. Link Mauve

    As it is a standalone element.

  159. Link Mauve

    Note also that even in a single namespace, multiple different elements might define an identically-named attribute.

  160. Link Mauve

    Possibly with different semantics.

  161. mjk

    I feel more enlightened and a little bit deader inside at the same time. Thanks everyone for the questions and the answers!

  162. Link Mauve

    :D

  163. moparisthebest

    same mjk

  164. moparisthebest

    After 2 years of intense research, Twitter proposes inventing XMPP: https://blueskyweb.xyz/blog/3-6-2022-a-self-authenticating-social-protocol

  165. mjk

    at last! The fourth xmpp!

  166. mjk

    (counting activitypub towards that)

  167. moparisthebest

    > With email, if you change your provider then your email address has to change too. flat-out lying is fine guys, they are twitter

  168. Sam

    That seems like a reasonable thing to say given their audience, they obviously just mean "they will have addresses not tied to a domain so you don't have to use your own domain if you want to move your account"

  169. moparisthebest

    "their audience" the subset of people that will read an article about a protocol but not understand basic email concepts? :/

  170. Sam

    It's a high level overview, not a deep dive into technical details. It seems like a reasonable thing to elide over.

  171. moparisthebest

    then don't mention it, rather than lie

  172. Sam

    It's not a lie, generally speaking what they're saying is true. They obviously just mean "it has a domain name in it", what they're suggesting is that you don't have to lug a domain name around, I think. eg. if you sign up on @twitter.com and get address "myname" then move to "example.com" your address will still just be "Myname" but a new server will be handling the data.

  173. mjk

    > We want users to have an easy path to switching servers, even without the server’s help. That's, like, rocket science! Right, Matt? ;)

  174. Zash

    And then just burn massive amounts of coal to power the blockchain to record what server every username is currently living on?

  175. Zash

    Easy! Why didn't we think of this????

  176. mjk

    If only there was a global infrastructure for paying to reserve a name...

  177. moparisthebest

    what if we invented some type of name service people could use to register names of their choosing?

  178. moparisthebest

    and like some type of hierarchical protocol to look them up? it would be revolutionary!

  179. Zash

    humans often organize themselves in hierarchies, perhaps something modeled after that?

  180. mjk

    It could also have authentication of records built in from the start!

  181. mjk

    It could also have hierarchical authentication of records built in from the start!

  182. moparisthebest

    now that would be something...

  183. MattJ

    Topic change: As I posted a while ago to the list, xmpp.net is a home to some a handful of "not officially XSF" projects, most notably the IM Observatory (and probably its successor)

  184. MattJ

    One of the projects has requested a MUC, which could live on muc.xmpp.org but might be confusing as a "not officially XSF" thing

  185. MattJ

    So one alternative option is to add a vhost for muc.xmpp.net or similar to this server

  186. MattJ

    From an iteam perspective I'm fine with that, and from a board perspective I'm fine with that. Does anyone have a perspective from this would not be fine? If not, I'll go ahead and set it up soon.

  187. moparisthebest

    or just stop playing that game and call it an official XSF thing

  188. moparisthebest

    not official, only ran 100% by the same people running the XSF

  189. emus

    moparisthebest: that will end up in lots of "discussion" I assume?

  190. MattJ

    Making things official XSF things is not always a good thing for such projects, or the XSF

  191. emus

    I tend to agree with Matt

  192. MattJ

    This is my opinion, I know we have had discussions in the past where people disagreed with it

  193. MattJ

    i.e. some people are of the opinion that the XSF should aim to be and do everything XMPP, while I prefer to keep it mostly just a vehicle for publishing standards

  194. moparisthebest

    just seems silly to me to continue "it's not official ;D" vs "ok XSF runs it"

  195. MattJ

    Partly because it has proven time and time again to be pretty bad at doing anything else, but mostly okay at the standards thing :)

  196. emus

    ^^

  197. emus

    MattJ - nothing against the Newsletter - OKKK?!?!! 😉

  198. mjk

    So it's a "trade mark" issue: "yea, we run it, but don't expect it to be as great as the main thing XSF is known for"? :)

  199. MattJ

    emus, no, the newsletter has been a rare exception... but that's mostly thanks to your dedication :)

  200. emus

    just kidding 🙂

  201. Sam

    I was about to say the opposite: the XSF is really bad at the newsletter, it's an XSF project that got dumped on the shoulders (voluntarily, of course) of a single individual who gets almost no support from anyone else :) (I say counting myself as complicit in that)

  202. Sam

    The newsletter itself is great, the XSF involvement not so much :)

  203. emus

    Well, no its not on me of course, I always try to list and make transparent who supported and it alright like that

  204. emus

    Well, no its not on me of course, I always try to list and make transparent who supported and its alright like that

  205. flow

    thanks Link Mauve, but I think I new all that already and I am not sure how this answers my question. let's say I have <foo:elem xmlns:foo="foo.org" foo:favorite-lang="fr"/> and assume we attribute namespaces are the ones of the element unless specified otherwise, then this could be written as <elem xmlns="foo.org" favorite-lang="fr">. Why shouldn't I then be able to use favorite-lang on a different element, in a different namespace even

  206. flow

    thanks Link Mauve, but I think I new all that already and I am not sure how this answers my question. let's say I have <foo:elem xmlns:foo="foo.org" foo:favorite-lang="fr"/> and assume attribute namespaces are the ones of the element unless specified otherwise, then this could be written as <elem xmlns="foo.org" favorite-lang="fr">. Why shouldn't I then be able to use favorite-lang on a different element, in a different namespace even