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."
I am impressed with the amount of press coverage and hype that has been surrounding XML and related technologies for the longest time now, but where is this stuff REALLY used ?
Does anybody have an example of high volume (so mainstream) websites using XML ? whereever I look all I see is good old HTML, a div or two (mostly tables still though) and Javascript stuff.
MP3 Search Engine
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?
...no seriously, then they might actually follow the standards that are out there (i.e. their supposed use of 'proper' XML in Longhorn).
Actually, maybe not. If they do have an O'Reilly Zoo, maybe the animals/books have been re-engineered into abominations... and then they follow what has been rewritten to produce anything.
Well I suppose Long"Horn" could be an animal derivative; the bit that MS chops off and gives to the customers.
Are you local? There's nothing for you here!
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.
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!!!!!!!!!!!!!!!!
I don't have hopes or dreams (yeah)
.Net
I don't have plans or schema's
I can't author anything
Since I don't have XSD
I looked on Google
And I checked out ActiveState
And I tried MacMall
They don't carry XSD
Microsoft says just use
Redhat says there's no RPMs for it yet
And Ellen Feiss says hers disappeared
I don't have XSD
This
They wrote a schema as well as a DTD (which has the usual namespace validity problems). XSD may be big and ugly, but the designers would have noticed if it couldn't even describe itself.
Then maybe you just shouldn't be doing such "complex" programming. XSD should not take more than a couple days to understand, another few days to iron out the details, and by the end of 30-40 hours you should have produced a good sample of whatever you're modelling with XSD.
Too many "how to" documents and books are written for people who just don't "get it". While I sympathise that they need to learn, you have to grasp the concept of abstraction before some of these "languages" make sense. XSD, ERDs, SQL-DDL, etc. are just different ways of describing data structures and organization. Each is "complex" if you try to make it do more than it was intended for, but only takes a couple weeks to understand well enough to get by.
I do not fail; I succeed at finding out what does not work.
XSD is one example that is particularly nasty because the W3C seems to plan forcing it in every other spec they create (for example XSLT 2.0, XQuery, RDF/OWL), making them very hard to implement (how many conformant XSD implementations are there? For languages other than Java?)
Programming can be fun again. Film at 11.