Live data from Hacker News

Relax NG is a schema language for XML (2014)

relaxng.org

11–20 of 27 posts

Re: Relax NG is a schema language for XML (2014)

#11
post #3

the compact non-xml syntax is neat: https://relaxng.org/compact-tutorial-20030326.html#id2814005 it reminds me of TypeScript. As for XML itself, it seems like it was a huge buzzword fad in the late 90s/early 2000s, but it must not have lived up to the hype or we’d actually be using it today instead of JSON and Protobuf. I got to computer programming around when the web gave up on XHTML, so i’m not really sure what to…

It is heavily used today, it's everywhere in finance and banking, it's just not on the web, so browser and web devs are forced endlessly to re implement shitty versions of things they could have had out of the box decades earlier.

Re: Relax NG is a schema language for XML (2014)

#12
post #3

the compact non-xml syntax is neat: https://relaxng.org/compact-tutorial-20030326.html#id2814005 it reminds me of TypeScript. As for XML itself, it seems like it was a huge buzzword fad in the late 90s/early 2000s, but it must not have lived up to the hype or we’d actually be using it today instead of JSON and Protobuf. I got to computer programming around when the web gave up on XHTML, so i’m not really sure what to…

XML is fundamentally incompatible with commonly used programming data structures, namely lists/arrays and structs/maps. That fundamental mismatch caused a lot of friction when people use XML for data exchange between programs. JSON is clear winner here.

XML is absolutely fine for data that maps naturally to it. For example text markup. While HTML technically is not XML, it's very close to it and XHTML still is a thing. Probably most people wouldn't enjoy using JSON to encode HTML pages.

Re: Relax NG is a schema language for XML (2014)

#13
post #3

the compact non-xml syntax is neat: https://relaxng.org/compact-tutorial-20030326.html#id2814005 it reminds me of TypeScript. As for XML itself, it seems like it was a huge buzzword fad in the late 90s/early 2000s, but it must not have lived up to the hype or we’d actually be using it today instead of JSON and Protobuf. I got to computer programming around when the web gave up on XHTML, so i’m not really sure what to…

XML is fundamentally incompatible with commonly used programming data structures, namely lists/arrays and structs/maps. That fundamental mismatch caused a lot of friction when people use XML for data exchange between programs. JSON is clear winner here. XML is absolutely fine for data that maps naturally to it. For example text markup. While HTML technically is not XML, it's very close to it and XHTML still is a thin…

> Probably most people wouldn't enjoy using JSON to encode HTML pages.

Probably yeah, but also, people don't know how enjoyable it is to just use lists and elements within it to represent HTML. Hiccup is a great example of this where you can do something like:

  [:h1 "Hey"
    [:strong
      {:style {:color "red"}}
      "there"]]
And it just makes sense. I'm sure we've yet to find the best way of writing HTML.

Re: Relax NG is a schema language for XML (2014)

#14
post #3

the compact non-xml syntax is neat: https://relaxng.org/compact-tutorial-20030326.html#id2814005 it reminds me of TypeScript. As for XML itself, it seems like it was a huge buzzword fad in the late 90s/early 2000s, but it must not have lived up to the hype or we’d actually be using it today instead of JSON and Protobuf. I got to computer programming around when the web gave up on XHTML, so i’m not really sure what to…

XML is fundamentally incompatible with commonly used programming data structures, namely lists/arrays and structs/maps. That fundamental mismatch caused a lot of friction when people use XML for data exchange between programs. JSON is clear winner here. XML is absolutely fine for data that maps naturally to it. For example text markup. While HTML technically is not XML, it's very close to it and XHTML still is a thin…

Huh? I always felt some of the failure/ bad reputation of XML was how it got tortured by devs who did not understand database normalization. If you “get” 3rd form normalization, xml works fine for the relations you describe, unless I am missing something.

To be clear, I am not being snide and would be interested in the cases you’re thinking of.

Re: Relax NG is a schema language for XML (2014)

#15
post #3

the compact non-xml syntax is neat: https://relaxng.org/compact-tutorial-20030326.html#id2814005 it reminds me of TypeScript. As for XML itself, it seems like it was a huge buzzword fad in the late 90s/early 2000s, but it must not have lived up to the hype or we’d actually be using it today instead of JSON and Protobuf. I got to computer programming around when the web gave up on XHTML, so i’m not really sure what to…

XML is fundamentally incompatible with commonly used programming data structures, namely lists/arrays and structs/maps. That fundamental mismatch caused a lot of friction when people use XML for data exchange between programs. JSON is clear winner here. XML is absolutely fine for data that maps naturally to it. For example text markup. While HTML technically is not XML, it's very close to it and XHTML still is a thin…

> XML is fundamentally incompatible with commonly used programming data structures, namely lists/arrays and structs/maps.

Another way to say this is XML is a grammar formalism that deals purely with serialisation rather than higher-level structures that might be serialised such as co-inductive data structures.

> While HTML technically is not XML, it's very close to it and XHTML still is a thing.

XML and HTML-as-serialisation-format are both subsets of SGML.

Re: Relax NG is a schema language for XML (2014)

#16
post #3

the compact non-xml syntax is neat: https://relaxng.org/compact-tutorial-20030326.html#id2814005 it reminds me of TypeScript. As for XML itself, it seems like it was a huge buzzword fad in the late 90s/early 2000s, but it must not have lived up to the hype or we’d actually be using it today instead of JSON and Protobuf. I got to computer programming around when the web gave up on XHTML, so i’m not really sure what to…

XML is fundamentally incompatible with commonly used programming data structures, namely lists/arrays and structs/maps. That fundamental mismatch caused a lot of friction when people use XML for data exchange between programs. JSON is clear winner here. XML is absolutely fine for data that maps naturally to it. For example text markup. While HTML technically is not XML, it's very close to it and XHTML still is a thin…

It isn’t incompatible. It’s just a massive superset of what is needed.

JSON offers simplicity

YAML offers readability

XML offers a massive feature set.

For what we need 99% of the time, simplicity and/or readability is a much higher requirement.

As for TOML, I honestly don’t understand why anyone likes that.

Re: Relax NG is a schema language for XML (2014)

#17
post #16

Earlier quoted context omitted.

XML is fundamentally incompatible with commonly used programming data structures, namely lists/arrays and structs/maps. That fundamental mismatch caused a lot of friction when people use XML for data exchange between programs. JSON is clear winner here. XML is absolutely fine for data that maps naturally to it. For example text markup. While HTML technically is not XML, it's very close to it and XHTML still is a thin…

It isn’t incompatible. It’s just a massive superset of what is needed. JSON offers simplicity YAML offers readability XML offers a massive feature set. For what we need 99% of the time, simplicity and/or readability is a much higher requirement. As for TOML, I honestly don’t understand why anyone likes that.

I don't think it's a superset. You can represent any structs-and-arrays data in XML, but you have to make non-trivial mappings to make it work.

The obvious way is to use elements for everything, but then you're mapping both structs and their fields (very different concepts in e.g. C) to elements. Attributes map nicely to struct fields, but they only admit string values.

Re: Relax NG is a schema language for XML (2014)

#18
post #17
post #16

Earlier quoted context omitted.

It isn’t incompatible. It’s just a massive superset of what is needed. JSON offers simplicity YAML offers readability XML offers a massive feature set. For what we need 99% of the time, simplicity and/or readability is a much higher requirement. As for TOML, I honestly don’t understand why anyone likes that.

I don't think it's a superset. You can represent any structs-and-arrays data in XML, but you have to make non-trivial mappings to make it work. The obvious way is to use elements for everything, but then you're mapping both structs and their fields (very different concepts in e.g. C) to elements. Attributes map nicely to struct fields, but they only admit string values.

That’s why it’s a superset ;)

You can map anything to it but that flexibility means you then need to define schemas et al to ensure compliance

The schema thing isn’t actually unique to XML either. you can do the same thing with JSON and YAML too. But in my opinion, if you get into the realm of needing schemas in JSON then you’re at the point where you shouldn’t be using JSON any longer since you’re now violating the “simplicity” argument which is JSONs only real advantage over other formats.

Re: Relax NG is a schema language for XML (2014)

#19
post #9

Earlier quoted context omitted.

>And I mean, it's not like SOAP+WSDL actually worked well either, it was always unreliable. I don't think it ever worked. See this [0]. It's pretty crazy that people build one of the most complex and verbose data exchange formats in the world and then it turns out that duplicating the open and close tag and including the parameter name and type in the attributes bought you nothing, because implementations are treatin…

SOAP always seemed to mostly work then if something did fail it was an utter nightmare to work out what the problem was - WSDL really wasn't much fun to read. Whereas when REST APIs came out (using JSON or XML) they were much easier to dive into at the command line with curl and work out how to get things started and diagnose problems when they inevitably came up.

I still cannot tell which one I hate the most: CSV or JSON. These really are hacks that should never have gotten the attention of the world, for data exchange.

Re: Relax NG is a schema language for XML (2014)

#20
post #17
post #16

Earlier quoted context omitted.

It isn’t incompatible. It’s just a massive superset of what is needed. JSON offers simplicity YAML offers readability XML offers a massive feature set. For what we need 99% of the time, simplicity and/or readability is a much higher requirement. As for TOML, I honestly don’t understand why anyone likes that.

I don't think it's a superset. You can represent any structs-and-arrays data in XML, but you have to make non-trivial mappings to make it work. The obvious way is to use elements for everything, but then you're mapping both structs and their fields (very different concepts in e.g. C) to elements. Attributes map nicely to struct fields, but they only admit string values.

Watch how dict2xml or xml2dict handle JSON to XML automatic mapping. Both format carry 99% of the same structural infos in their respective serialization.
Post reply on HN