3 ms·
Honestly I don't agree with you, the abstract concept behind XML is just to provide a metalanguage for the representation of hierarchical data, and that's exact
by lp4vn 4y ago
Honestly I don't agree with you, the abstract concept behind XML is just to provide a metalanguage for the representation of hierarchical data, and that's exactly what JSON and YAML do. They are completely interchangeable. XML is the general case for hierarchical data and provides tools for this general case. JSON got closer to the representation of list and hashmaps, but I see this as a mere convenience.
>This is why there is no xslt equivalent (although you could argue that jq is that) and the various json schema solutions don't see much adoption, despite json being almost as old as XML at this point.
I think it's incorrect to part from the assumption that nobody's gonna need a schema language, a query language, a mapping language or whatever. For the json schema this is blatantly untrue and you see many people creating their own version of a json schema because it's really needed. With XSLT you have a language for processing XML that's written in XML itself, what I find pretty nice. We're not gonna see a YAML processing language written in YAML any time soon though.
- tannhaeuser 4y ago> the abstract concept behind XML is just to provide a metalanguage for the representation of hierarchical data No it isn't, for the umpteenth time. It is a language for marking up text. Markup language deal with grammars - data serialization not data models, and if anything, having regular content models is a more characteristic property for markup languages compared to hierarchy.
- EdiX 4y ago> the abstract concept behind XML is just to provide a metalanguage for the representation of hierarchical data What you are describing here is s-expressions, XML represents a far more specific type of data structure: a tree of nodes where each node is either a text node or a tag node. Text nodes are always terminal, tag nodes can either be terminal or not. Tag nodes also have a list of attributes, while text nodes do not. Each attribute is a key value pair where both the key and the value are text, but the key can only contain certain characters, whereas the value is unrestricted. This is all fairly complicated and it doesn't really map well to almost anything. Even the description is longwinded. You say: > JSON got closer to the representation of list and hashmaps, but I see this as a mere convenience I say that calling it "mere" convenience is underselling it. The data model of XML is of so little use that no programming langauge, besides XSLT, offers it as part of the language. Vice versa hashmaps and list are nearly universal. > I think it's incorrect to part from the assumption that nobody's gonna need a schema language, a query language, a mapping language or whatever I didn't say that. I said that with XML the need for those tools is especially pressing because XML is such a poor fit for any programming language. > you see many people creating their own version of a json schema because it's really needed Sure, but you also see very low adoption for json schema, because it isn't needed as much as xml schema was.
- kaba0 4y agoSo object graphs are rare in your opinion?