Modern XMPP project discussion - 2025-08-19


  1. a moderator removed a message

  2. alexkurisu

    > But then thanks to limitations in Conversations database schema, that is basically what we have already. Wait, someone actually validates incoming XML?

  3. alexkurisu

    Doesn't that go against the whole reason why XMPP uses XML in the first place?

  4. MattJ

    I'm not sure what you mean

  5. alexkurisu

    Validating incoming stanzas against a schema

  6. alexkurisu

    Instead of just ignoring unknown stuff

  7. 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

  8. MattJ

    XML extensibility works via namespaces, and each namespace has a schema

  9. jonas’

    exactly

  10. jonas’

    schemas can (and do) allow for extension outside their namespace

  11. MattJ

    It's "against the rules" to just put unknown stuff into an existing namespace

  12. 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 ;)

  13. 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)

  14. MattJ

    XML allows both

  15. alexkurisu

    > It's "against the rules" to just put unknown stuff into an existing namespace But what if someone added something without changing namespace

  16. MattJ

    Then stuff can break

  17. MattJ

    The XSF does not allow such changes in XEPs, so that would not be an official XMPP extension

  18. MattJ

    In practice, it would generally be okay, but no guarantees

  19. MattJ

    Since most implementations are extremely relaxed when it comes to validation

  20. alexkurisu

    IIRC, some XEPs had additions without changing namespace

  21. alexkurisu

    Damn, i edited the message instead of sending new one

  22. 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.

  23. jonas’

    MattJ, JSON schemas do have namespaces, don't they? It's just a hell to parse. Or is that only with JSON-LD?

  24. MattJ

    AFAIK only JSON-LD gets you anything like that

  25. 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

  26. jonas’

    MattJ, right.

  27. jonas’

    alexkurisu, examples would help. There may be exceptions, but they should be rare. Normally such changes incur a namespace bump.

  28. alexkurisu

    The most recent example is XEP-0363 and the "Upload purpose" stuff

  29. MattJ

    https://xmpp.org/extensions/xep-0363.html#example-7

  30. MattJ

    Notice how the new element has a different namespace

  31. alexkurisu

    Ah, wait, it adds it in its own namespace, yeah.

  32. alexkurisu

    And that's what lack of proper sleep does to your brain…

  33. MattJ

    So an implementation that validates using the old namespace will just ignore that element, and validate successfully, as intended

  34. MattJ

    Which is nice, it makes the rules of extensibility well-defined, rather than a gamble every time you add something

  35. edhelas

    > AFAIK only JSON-LD gets you anything like that Made a meme from that

  36. jonas’

    the LD in JSON-LD is for lethal dose.

  37. edhelas

    https://upload.movim.eu/files/9d94237298995552fa13436420195fbca436dce7/HKyI9hCRwKA3/chat_1000008762.jpg

  38. ammulete removed by moderator

  39. a moderator removed a message