Hacker News new | ask | show | jobs
by tmoertel 4701 days ago
It's tragic that the United States (Federal) Legislative Model (USLM) is defined in terms of W3C XML Schema Definition language (XSD) instead of the comparably sane RELAX NG and its easily interpreted compact syntax. You would think that something this important ought to be made clear and understandable.

EDITED TO CLARIFY: The tragic part isn't that the schema is given in XSD but that it's defined in XSD, which lacks RELAX NG's simple semantics and composibility rules. For a good summary of what I'm referring to, see James Clark's message to the IETF on the subject:

http://www.imc.org/ietf-xml-use/mail-archive/msg00217.html

1 comments

In practice, it probably doesn't make any difference. Assuming, for the sake of argument, that XSD is expressive enough to allow the authors to say what they're trying to say, in an unambiguous way, it's more or less a moot point. RELAX/NG is awesome, sure... but to some extent the "war" between it and XSD is a religious war.

Pretty much every popular & widely used language / platform has XSD support... hell, it's so commonplace there are probably schema aware xml parsers in Brainfuck, INTERCAL and Befunge.

RELAX NG may well be a better choice, but saying this is "tragic" strikes me as a bit of excessive hyperbole.

The tragic part isn't that the schema is given in XSD but that it's defined in XSD. What I'm lamenting (yes more hyperbole) is that a schema this important wasn't defined in a schema language that had clear semantics and composability rules, fostering reuse and adoption for related domains, of which we would expect there to be many. (Later, of course, the definition could always be extruded into XSD and other popular yet semantically stunted formats as a practical publication step.)
Fair enough. I haven't really dug into this schema in detail yet, but I'm guessing that XSD is expressive enough, and that - worst case - somebody could define an equivalent schema in $WHATEVER, and mirror the data after tranforming it. It's not a perfect setup, but at least it might make the content more usable for some purposes.

I'm kinda curious to see what can be done with it in terms of transforming to RDF triples myself, but time will tell...

I didn't need to know about INTERCAL and Befunge :)

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

http://en.wikipedia.org/wiki/Befunge

It could be worse... lookup the Piet programming language (be sure to include all 3 words in the search) :).