3 ms·
The xml spec needs to be complemented with xsd, relax-ng or whatever schema tool is popular these days, yaml includes that. Still in the same ballpark I expect
by riffraff 3y ago
The xml spec needs to be complemented with xsd, relax-ng or whatever schema tool is popular these days, yaml includes that.
Still in the same ballpark I expect.
- funcDropShadow 3y agoWhich kind of schemas are part of yaml? Interestingly although Yaml's spec is longer than XML's spec, it managed to get all sorts of corner cases awefully wrong. https://noyaml.com https://noyaml.com
- riffraff 3y agoI mean YAML has tags (!!MyType) and built-in types like date etc which XML does not. It also solved the "no" issue and many corener caes in YAML 1.2 which has been out for 15 years or so, but libraries have not upgraded.
- Mikhail_Edoshin 3y agoThe XML specification does contain a schema: the DTD. This is why it is 37 pages; without the DTD part it would be at most a half of that. Other schemas are not merely popular, they are more powerful. In DTD the type of the element depends only on its own name. In XSD the type depends potentially on the context: the type of 'xxx' in 'aaa/xxx' and 'bbb/xxx' may be different. And in Relax NG we can define different types, for example, for the first 'xxx' and for the subsequent 'xxx's. These extensions make the validation somewhat more elaborate, but still linear, as it we remain within the complexity of a regular expression. These are formal validators; then there is Schematron which seems to be more like a business-rule kind of a validator that also has its uses.