- a moderator removed a message
-
alexkurisu
> But then thanks to limitations in Conversations database schema, that is basically what we have already. Wait, someone actually validates incoming XML?
-
alexkurisu
Doesn't that go against the whole reason why XMPP uses XML in the first place?
-
MattJ
I'm not sure what you mean
-
alexkurisu
Validating incoming stanzas against a schema
-
alexkurisu
Instead of just ignoring unknown stuff
-
MattJ
The thing you quoted is nothing to do with "validating XML", but also yes, some implementations use schemas, and that's not against extensibility
-
MattJ
XML extensibility works via namespaces, and each namespace has a schema
-
jonas’
exactly
-
jonas’
schemas can (and do) allow for extension outside their namespace
-
MattJ
It's "against the rules" to just put unknown stuff into an existing namespace
-
jonas’
there are SOME implementations (not pointing fingers at you, xmpp-rs) which will by default reject *anything* they don't know (even if it's in another namespace), but I consider that bad practice and will work on changing that ;)
-
MattJ
The "just ignore unknown stuff" is what JSON-based systems basically have to do, because they don't have namespaces, and therefore can't do strict schema validation (if they also want extensibility)
-
MattJ
XML allows both
-
alexkurisu
> It's "against the rules" to just put unknown stuff into an existing namespace But what if someone added something without changing namespace✎ -
MattJ
Then stuff can break
-
MattJ
The XSF does not allow such changes in XEPs, so that would not be an official XMPP extension
-
MattJ
In practice, it would generally be okay, but no guarantees
-
MattJ
Since most implementations are extremely relaxed when it comes to validation
-
alexkurisu
IIRC, some XEPs had additions without changing namespace ✏
-
alexkurisu
Damn, i edited the message instead of sending new one
-
MattJ
But for the sake of ensuring interoperability and avoiding surprises, it's still good to stick to the rules. Even if it doesn't strictly validate a schema, if an implementation is developed against one schema, and then you change it in some way, you don't know if the code will correctly handle it the way you want.
-
jonas’
MattJ, JSON schemas do have namespaces, don't they? It's just a hell to parse. Or is that only with JSON-LD?
-
MattJ
AFAIK only JSON-LD gets you anything like that
-
alexkurisu
> The XSF does not allow such changes in XEPs, so that would not be an official XMPP extension IIRC, some XEPs had things added in them without namespace changes
-
jonas’
MattJ, right.
-
jonas’
alexkurisu, examples would help. There may be exceptions, but they should be rare. Normally such changes incur a namespace bump.
-
alexkurisu
The most recent example is XEP-0363 and the "Upload purpose" stuff
-
MattJ
https://xmpp.org/extensions/xep-0363.html#example-7
-
MattJ
Notice how the new element has a different namespace
-
alexkurisu
Ah, wait, it adds it in its own namespace, yeah.
-
alexkurisu
And that's what lack of proper sleep does to your brain…
-
MattJ
So an implementation that validates using the old namespace will just ignore that element, and validate successfully, as intended
-
MattJ
Which is nice, it makes the rules of extensibility well-defined, rather than a gamble every time you add something
-
edhelas
> AFAIK only JSON-LD gets you anything like that Made a meme from that ↺
-
jonas’
the LD in JSON-LD is for lethal dose.
-
edhelas
https://upload.movim.eu/files/9d94237298995552fa13436420195fbca436dce7/HKyI9hCRwKA3/chat_1000008762.jpg
- ammulete removed by moderator
- a moderator removed a message