News for hackers. Stuff that matters.
Re:The Goals of XML at 25: and the one change that XML now n... by tannhaeuser on Monday July 19, 2021 @10:25AM (#27882951)
I find the hoops that people are jumping through to rationalize element-vs-attribute use fascinating.

How about: markup languages are good for encoding text, and everything that isn't directly part of text content ("metadata") goes into attributes? Arrives at about the same judgement regarding the relative merit for the use cases you mentioned.

I'd like to add that, while XMPP is XML-based, it might be more suitable to use a full-blown SGML parser to deal with XMPP streams being presented as incomplete XML (eg end-element tags missing) which SGML can deal with in a formal way (end-element inference).

Re:The Goals of XML at 25: and the one change that XML now n... by MattJ100 on Monday July 19, 2021 @10:43AM (#27883192)
> I'd like to add that, while XMPP is XML-based, it might be more suitable to use a full-blown SGML parser to deal with XMPP streams being presented as incomplete XML (eg end-element tags missing) which SGML can deal with in a formal way (end-element inference).

It's not that end tags are missing in XMPP, just that the "document" is streamed so it isn't all available at once. Any common SAX-style parser can deal with streaming documents.

https://en.wikipedia.org/wiki/Simple_API_for_XML