Authoring Schemas With XSD
Dare Obasanjo points to his own "article on O'Reilly's XML.com that specifies a set of guidlelines for authoring schemas using the W3C XML Schema Definition language commonly abbreviated as XSD. The primary theme is embracing simplicity by showing how to avoid the more complex and esoteric features of the language."
When the W3C XML Schema recommendation was first released, there were certain parties whom overwhelmed by its newness, complexity and buggy implementations began to advocate using as few features as possible which culminated in the article W3C XML Schema Made Simple by Kohsuke Kawaguchi. However, a year later with parser implementations getting up to speed and more people using the technology it is clear that a number of the earlier misgivings about using some parts of the technology were misguided.
This is very similar to the situation with Mozilla and C++. In 1998, a few months after the ISO standard was ratified a set of guidelines for using C++ were specified by the Mozilla team which included rules like don't use templates, don't use exceptions, and don't use namespaces. Since then the Mozilla team has looked back at their decision and realized that some of the decisions they made were unwise specifically listed as mistakes were avoiding exceptions and templates. I truly commend the Mozilla team for making their post mortem available online for other [C++ or otherwise based] software development projects to learn from.
This article aims to do the same thing for the XML community and the W3C XML Schema recommendation.
As someone who's just downloading the XML Mind editor and about to write an .xsd for my data -- this is great timing! Thanks, Dare.
I also want to gripe a bit about the complexity of XML Schema. DTD has all the restrictions I'd typically want to use (the main thing I want to do is just specify element names, contents, and attributes). The *only* problem with DTD's is that they are totally namespace-challenged!
You can't use combine two DTD's for different namespaces into a combo document. You can't even allow arbitrary other elements in a DTD element declaration -- every element must be declared and local. Even worse, you have to pick and stick with a namespace prefix in your DTD -- defeating the whole point of globally unique namespaces.
What I *really* want is just DTD with a smidge of namespace smarts and the ability to combine DTD's for one document. Anyone want to give it a shot?
XML is a language. So is HTML. So is SQL. Just because a language isn't Turing-complete doesn't make it not a language.
Actually, I agree with you that XSD isn't a language -- it's a specific set of rules for using a language, XML; it would be better to call it a grammar. But saying "___ isn't a language" because ___ doesn't do everything C does is as silly as the "MySQL isn't a database (management system)" crap that floats around here every so often.
I think the target audience is sophisticated to understand the difference between a language that's Turing-complete and one that isn't, and also to know that markup languages are still languages by any reasonable definition of the word.
The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
James Clark fights with XSD, pushing his Relax NG. Relax NG is *not* W3C. Let me repeat a background.g 00 217.html
XML (markup language created by W3C) is a subset of SGML (markup language created by ISO).
XML has been created by few smart marginals from SGML world plus some MS politicians
Now those MS politicians (and alikes) rule the show in W3C and the smart marginals have left W3C and work for ISO ( OASIS ).
XSD is XML Schema language by W3C. Relax NG is XML Schema language by ISO (OASIS). Sofar, Relax NG is the first visible XML applicatuon which belongs not to W3C
Now when we have a big picture written down, I would recommend reading the letter from James Clark
http://www.imc.org/ietf-xml-use/mail-archive/ms
The RELAX NG formalism has a solid basis in tree automata theory. W3C XML Schema has no such basis.
e t.c.
BTW, even RELAX NG is definately better than XSD, Relax NG itself is also not that perfect. The 'perfect' solution could be based on regular expressions. Nevermind. In the next years, nothing interesting (except for political battles) would happen in the world of XML Schema.
"This must be a Thursday, I never could get the hang of Thursdays."
A client will call an API such as getFOO which will have an input type of InputGetFoo and an output type of OutputGetFoo defined in an xsd file. Because both our system and the client use the same xsd files, there is very little problem with synchronization. Using xml allows our clients to have a heterogenuous environment; anything that can deliever xml over tcp/ip can use our interface.
XML is good for industry standards bodies. It's open, there are open implementations, and you can irrefutably lay down the syntactic and semantic law in a schema without any ambiguity.
FpML, ArApXML, MDML are good examples of industry-specific XML standards. Going into the wider space, you get ebXML, SOAP and more.
XML is the new-world replacement for EDI (Electronic Data Interchange) and it's biggest uses are B2B and company-internal, with a small B2C following starting up for things like weather data, news feeds etc. It's not surprising you've not come across it... and until you go and work for a megalithic corporation on the IT side, you probably won't.
If you can't see this, click here to enable sigs.
I think they already have a copy. The author, Dare Obasanjo, works for them.
I watched C-beams glitter in the dark near the Tannhauser gate.
I'm not sure how much traffic they get these days, but the InfoWorld website is XML based. I believe it uses server-side XSLT transforms to turn XML into HTML.
Also, don't assume that just because the URLs don't have ".xml" in them that the site isn't using XML - it's often transparent, such as when using Apache Cocoon
---------------------------------------------
SERENITY NOW!!!!!!!!!!!!!!!!
Take a look at www.gentoo.org The whole site uses XML.
Also check out Daniel's articles for IBM developerWorks describing the site... Part 1 Part 2 Part 3 Part 4