-
Daniel
goffi: as a module to an existing server?
-
Daniel
any source code I could look at?
-
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.
-
Guus
does the specs allow for (non-namespaced) attributes to be added to message/iq/presence stanza elements?
-
Guus
`<message foo='bar' ... `
-
Zash
Yes officer, this message right here ↑
-
Zash
Guus, have fun with the protocol police 😉
-
Link Mauve
Woop woop~
-
jonas’
Guus, most certainly not
-
mjk
Meanwhile, in Matrix: -- This is not the protocol violation you're looking for *waves hand, making the protocol support it* -- Woah...
-
jonas’
use namespaced attributes, they're there for that use case
-
Zash
or stuff it in a namespaced element
-
jonas’
or that, but you can't do that for IQs
-
Kev
Please don't shove new stuff in a stanza header, I would expect most of the world to break in that case.
-
Zash
I expect half the world to pass it along to the other half, where it'll break.
-
jonas’
one half being prosody, the other half being ejabberd?
-
Guus
I'm asking because I was amazed that I'm looking at client traffic that does it, without it breaking in dramatic ways.
-
Guus
are _namespaced_ attributes on those elements even ok?
-
Kev
Not really.
-
Zash
Slightly less not okay at least.
-
Kev
We're bad at documenting our extension points, though.
-
Zash
It's XML! Everywhere's an extension point if you namespace it!!
-
Guus
You'd need to somehow add the namespace to the ... stream element? Feels pretty messy.
-
Guus
So, yeah, shove it in a child element somewhere.
-
Guus
to make you share in my misery, I'm looking at an attribute on a message stanza that starts with this:
-
Zash
no no noooooooo
-
Guus
`sensorList="{"data":[{"type":"sensorOne",` followed by slightly over 2000 characters
-
Guus
and that's just one of those attributes. :D
-
Kev
JSON inside a default-namespaced attribute on a message stanza. I don't see what could possibly go wrong.
- Guus walks out of the bar, whistling.
- Zash fills eyes with kerosene
-
Kev
Really, what's the odd Eldrich Horror between friends?✎ - Maranda huhus.
-
Kev
Really, what's the odd Eldritch Horror between friends? ✏
-
Guus
but as I said: this doesn't break, apparently.
-
Kev
I think you've just not found the myriad places it breaks, yet :)
-
jonas’
Guus, no you don't, you can <message xmlns:foo='bar' foo:fnord='xyz'/>✎ -
jonas’
Guus, no you don't have to declare it on the stream header, you can <message xmlns:foo='bar' foo:fnord='xyz'/> ✏
-
Guus
jonas’ ah yes. Still not a good idea probably.
-
Guus
Kev: let me put it this way: it's running in production, but they're now reaching out because of some issues.
-
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.
-
Zash
Guus, show them https://xmpp.org/extensions/xep-0432.html
-
Guus
(also: hardcoded stanza IDs)
-
Guus
Zash: but it has a big red warning on top of it! must be worse than rolling our own!
-
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?)
-
Zash
Guus: Or push for advancement?
-
jonas’
this sounds like a low-hanging push-for-advancement fruit indeed
-
Guus
Zash we can do that for individual XEPs - I was trying to go for a more generic approach.
-
Zash
I think I even added that to mod_rest
-
Guus
RFC6121 8.4 explicitly states that 'extension attributes' _are_ allowed, I think. See https://datatracker.ietf.org/doc/html/rfc6120#section-8.4
-
Zash
Is now the time to remember how the `@c` attribute in `<a xmlns="b" c="d"/>` isn't in the "b" namespace?
-
Guus
XML prefixes
-
Guus
as jonas showed earlier.
-
Zash
Like `xmlns:extension="blah" extension:attr="moo"`, yeah that's fine.
-
Guus
`xmlns:prefix="uri" prefix:c="yey"`
-
Guus
yeah, exactly.
-
Kev
Guus: Yes, it does. I predict it would still break things.
-
MattJ
It will break broken things
-
Kev
Sure. Whereas doing it inside jabber:client will break unbroken things.
-
jonas’
nobody proposed doing it in jabber:client
-
jonas’
which I'm sure will cause fun effects :D
-
Kev
That's exactly what the sample Guus pasted was doing.
-
jonas’
no
-
Kev
Nobody was proposing it was a good idea, naturally.
-
jonas’
in <message xmlns="jabber:client" foo="bar"/>, @foo is *not* in the jabber:client namespace.
-
Kev
Ok, default namespace, yes.
-
jonas’
no
-
jonas’
without namespace.
-
Zash
Let's just pretend it's in jabber:client plz
-
jonas’
<message xmlns="jabber:client" xmlns:jc="jabber:client" jc:foo="bar"/> is in jabber:client then.
-
jonas’
and it is semantically different from the former
-
Zash
That's what all code I have ever known does
-
jonas’
so please let's not pretend that
-
Kev
I know what I mean, even if I'm not using the right terms for it.
-
Link Mauve
Dino’s internal representation does the wrong thing here. :<
-
Zash
This is a silly part of XML
-
Kev
I do know that attributes without a namespace live outside, although I always miscall 'no namespace' 'the default namespace'.
-
moparisthebest
> in <message xmlns="jabber:client" foo="bar"/>, @foo is *not* in the jabber:client namespace. so every websocket implementation ever is broken ?
-
Kev
No, I don't believe so.
-
jonas’
moparisthebest, why?
-
jonas’
moparisthebest, the attributes on stanzas in XMPP are supposed to be in no namespace
-
Kev
The attributes in XMPP are in the null-namespace, whatever the right term is.
-
moparisthebest
oh, ok then
-
Zash
But they ... belong with the whatever namespace xmlns specifies, somehow
-
moparisthebest
this hurts my brain and I do not like it
-
Zash
Yes. Let's pretend this obscure corner of XML doesn't exist!
-
Kev
Everyone pretends they live in the jabber:client/jabber:server namespaces because that's what XML would do if it wasn't insane.
-
Kev
But they're not.
-
Zash
We're really using XmppML anyways 😉
-
Kev
Really all the attributes in XMPP should have been namespaced, but that would have been hideous.
-
moparisthebest
I'm all for going back to pretending it worked the way I always thought it worked
- MattJ votes for that plan
-
jonas’
moparisthebest, what do you do on `<message xmlns="jabber:client" xmlns:jc="jabber:client" jc:foo="bar"/>` then?✎ -
jonas’
moparisthebest, what do you do on `<message xmlns="jabber:client" xmlns:jc="jabber:client" jc:foo="bar" foo="baz"/>` then? ✏
-
moparisthebest
honestly I have no idea
-
moparisthebest
reject whatever made it as bad software? :)
-
jonas’
:(
-
Zash
redirect whoever made the software to an insane asylum perhaps?
-
moparisthebest
up until 2 minutes ago I would have said that's a duplicate attribute, both under jabber:client
-
Kev
Sometimes being wrong is the better option :)
-
moparisthebest
so to be clear, any attribute that doesn't have an explicit `namespace:` in front is *not* in a namespace at all ?
-
Zash
apparently
-
moparisthebest
ever, regardless of higher level namespaces ?
-
Zash
so like `(null):attr=""`
-
Zash
I'm not about to read the XML specification.
-
moparisthebest
:mind-blown:
-
Kev
I believe that to be correct, yes, although it's a while since I checked in the spec and I might misremember.
-
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.
-
flow
maybe there is a good reason why non-qualified attribute names are in a namespace without value?
-
flow
what's again the difference between xep432 and xep335?
-
flow
ahh ep432 builds upon xep335
-
jonas’
moparisthebest, https://www.w3.org/TR/REC-xml-names/#defaulting
-
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.
-
jonas’
> The namespace name for an unprefixed attribute name always has no value.
-
jonas’
(namespace name == namespace URI in more common lingo)
-
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✎ -
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 ✏
-
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?
-
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.
-
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* ?
-
wurstsalat
ralphm, thank you!
-
Link Mauve
moparisthebest, no, it means that it applies to the element, which incidentally defines which attributes are accepted and how to interpret them.
-
jonas’
unnamespaced attributes inherently belong to the element, and how to interpret them is at the elements discretion
-
moparisthebest
Link Mauve, still not understanding, if an attribute doesn't have a prefix, does it ever have a namespace ?
-
jonas’
moparisthebest, no.
-
Link Mauve
moparisthebest, never.
-
jonas’
otherwise, the second example from that uniqAttrs anchor would not universally be valid
-
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).
-
Link Mauve
(The latter is an addition in SVG2, it would usually be in the http://www.w3.org/1999/xlink namespace.)
-
moparisthebest
so a namespace for an element decides which non-namespaced attributes it can have on it ?
-
moparisthebest
s/non-namespaced/null-namespaced/
-
Link Mauve
Of course, since it defines the element.
-
jonas’
no, the element decides which non-namespaced attributes it can have on it✎ -
jonas’
indirectly, the element decides which non-namespaced attributes it can have on it ✏
-
moparisthebest
I think I understand this now, thanks
-
moparisthebest
I don't understand in what universe this makes sense though, so if anyone wants to help with that...
-
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.
-
jonas’
Link Mauve, but that would still work if attributes worked the same way as elements
-
jonas’
however, it allows namespaces to define attributes which have a meaning independently from the element they appear on
-
Link Mauve
Right.
-
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)
-
jonas’
though I think that this particular trade-off is not worth the headaches it causes
-
jonas’
as namespace URIs are cheap
-
Link Mauve
We have no way to go back in time and change XML 1.0 + Namespaces anyway.
-
Link Mauve
No known* way.
-
moparisthebest
unfortunately this feels like proof that time travel is impossible
-
moparisthebest
surely if it was, someone would have fixed this first
-
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.
-
Link Mauve
Guus, XML 1.0 + Namespaces forbids redefining the namespace of the xmlns or xml prefixes.
-
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?
-
Link Mauve
Guus, “that attribute”, the @xml:lang?
-
Link Mauve
It already has a prefix, which is xml, and is illegal to redefine or to define anything to the same namespace.
-
Guus
Link Mauve: I misinterpreted jonas’ earlier comment.
-
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?
-
Link Mauve
flow, conceptually, an attribute only refines its element.
-
Link Mauve
It wouldn’t make any sense to use e.g. the XHTML video/@loop on an XMPP message/body.
-
Link Mauve
It would make sense to include an XHTML video element in an XMPP message though.
-
Link Mauve
As it is a standalone element.
-
Link Mauve
Note also that even in a single namespace, multiple different elements might define an identically-named attribute.
-
Link Mauve
Possibly with different semantics.
-
mjk
I feel more enlightened and a little bit deader inside at the same time. Thanks everyone for the questions and the answers!
-
Link Mauve
:D
-
moparisthebest
same mjk
-
moparisthebest
After 2 years of intense research, Twitter proposes inventing XMPP: https://blueskyweb.xyz/blog/3-6-2022-a-self-authenticating-social-protocol
-
mjk
at last! The fourth xmpp!
-
mjk
(counting activitypub towards that)
-
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
-
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"
-
moparisthebest
"their audience" the subset of people that will read an article about a protocol but not understand basic email concepts? :/
-
Sam
It's a high level overview, not a deep dive into technical details. It seems like a reasonable thing to elide over.
-
moparisthebest
then don't mention it, rather than lie
-
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.
-
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? ;)
-
Zash
And then just burn massive amounts of coal to power the blockchain to record what server every username is currently living on?
-
Zash
Easy! Why didn't we think of this????
-
mjk
If only there was a global infrastructure for paying to reserve a name...
-
moparisthebest
what if we invented some type of name service people could use to register names of their choosing?
-
moparisthebest
and like some type of hierarchical protocol to look them up? it would be revolutionary!
-
Zash
humans often organize themselves in hierarchies, perhaps something modeled after that?
-
mjk
It could also have authentication of records built in from the start!✎ -
mjk
It could also have hierarchical authentication of records built in from the start! ✏
-
moparisthebest
now that would be something...
-
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)
-
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
-
MattJ
So one alternative option is to add a vhost for muc.xmpp.net or similar to this server
-
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.
-
moparisthebest
or just stop playing that game and call it an official XSF thing
-
moparisthebest
not official, only ran 100% by the same people running the XSF
-
emus
moparisthebest: that will end up in lots of "discussion" I assume?
-
MattJ
Making things official XSF things is not always a good thing for such projects, or the XSF
-
emus
I tend to agree with Matt
-
MattJ
This is my opinion, I know we have had discussions in the past where people disagreed with it
-
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
-
moparisthebest
just seems silly to me to continue "it's not official ;D" vs "ok XSF runs it"
-
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 :)
-
emus
^^
-
emus
MattJ - nothing against the Newsletter - OKKK?!?!! 😉
-
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"? :)
-
MattJ
emus, no, the newsletter has been a rare exception... but that's mostly thanks to your dedication :)
-
emus
just kidding 🙂
-
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)
-
Sam
The newsletter itself is great, the XSF involvement not so much :)
-
emus
Well, no its not on me of course, I always try to list and make transparent who supported and it alright like that✎ -
emus
Well, no its not on me of course, I always try to list and make transparent who supported and its alright like that ✏
-
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✎ -
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 ✏