XSF Discussion - 2018-07-30


  1. edhelas

    is there a way to fix the XML indentation in the XEP examples ? it's all broken in many XEPs

  2. edhelas

    https://xmpp.org/extensions/xep-0409.html for example

  3. Ge0rG

    edhelas: define "broken"

  4. edhelas

    https://movim.eu:5280/upload/9d94237298995552fa13436420195fbca436dce7/j2E7LJlOhofjtYzzYBHT8HcJiI29y3Ud9XTHA4SG/Screen_Shot_2018-07-30_at_14.01.35.png

  5. Ge0rG

    `<span class="pln">&nbsp; &nbsp; &nbsp; </span>`

  6. Ge0rG

    it seems like the indentation is part of the original xml, just with 0x20 and not with nbsp.

  7. flow

    edhelas, that is caused by the author not moving the example stanza to the front of the line in the XML: https://github.com/xsf/xeps/blob/master/xep-0409.xml#L83

  8. flow

    feel free to submit a PR

  9. edhelas

    I'm wondering if we could add a linter

  10. jonasw

    edhelas, I have a linter work-in-progress

  11. jonasw

    I should probably put it somewhere on the internet

  12. jonasw

    maybe someone is motivated to work on this, I’m EBUSY currently https://github.com/horazont/xeplint

  13. Zash

    Wait what, <items node='.' max_items='1'/>

  14. Zash

    Never seen that before

  15. MattJ

    Says who?

  16. Zash

    JabberCat

  17. Zash

    Also the XEP

  18. Zash

    https://xmpp.org/extensions/xep-0060.html#example-84

  19. Link Mauve

    edhelas, it does trigger my OCD, but so far I haven’t been able to do enough introspection in XSLT to reach what I’d like, which is a new <xml-example/> tag which would contain XML in it, not as CDATA but as normal XML, to benefit from all of the checking our parsers already do.

  20. Ge0rG

    send PRs that move every example block to the left?

  21. Link Mauve

    I do that whenever I encounter one, but it’d be much better to have that as part of our tooling instead.

  22. waqas

    I'm much less of an XSLT fan these days

  23. Link Mauve

    The other benefit would be to be able to do syntax highlighting without depending on JS.

  24. waqas

    Link Mauve: How? Just for XML you mean? Many of our examples are pseudo-XML, not valid XML.

  25. Link Mauve

    Oh?

  26. Link Mauve

    Do you mean the ones with CLIENT: and such?

  27. pep.

    Maybe allow for the examples to be parsed as xml, add an attribute or something on the tag