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
I think misrepresentations like these from story submitters ultimately detract from the overall quality of the articles and I'm sure that the author wouldn't be all too thrilled about it.
It's akin to those Costco salespeople who tell me that the "shweet" HP computer over there has 20GB of "RAM". It looks a bit dumb given the target audience.
Someone trying to simplify a commonly interchange files type. Maybe now I can Stop receiving all the word documents as attachments.
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!
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
Im quite sure its the later. Personally I would rather hear about the RIAAs raid on the US Navy wich may result in court marshals of those that had mp3s on their laptops.
That begs the question: Where is the XML description of the description language?
The article said something about months to fully understand. Months? This is a standard? ANyone remember XSL formatting language? Anyone use it? Nope, because it was huge. XSL-T was reasonably sized and it got used.
How anything in XML-land takes months to understand when XML docs are little more than glorified hyped text files is beyond me. The only time this should happen is understanding what human/cultural aspect XML is trying to represent, not a technology.
Hey, I'm just your average shit and piss factory.
You have a point about parsing time. Although, in general parsing time is not a concern. The time spent parsing is usually negligible compared to the time spent processing once the data is parsed.
Mix XTC and LSD together and what do you get??
XSD!!!
Yes, thats right kids, this is really nothing more than a wild halucenegenic for your computer! Mix this in to your web pages, and look at all the `trippy' designs and patterns that it creates.
Available by the tab, strip or sheet.
(for the humor impaired, this is a joke. Maybe you need to take this stuff.)
Since the comment was modded up as insightful, would somebody please interpret it? It made no sense to me.
What the hell is Relax NG and could an XML author count on support for it in an XML application?
A while back I ran into a rather stupid bug in RedHat. After some debugging I figured out the problem was due to a "description" field missing from one of the config files (/boot/module-info).
At the top of this file in the "comments" was a brief note about the format that this file was supposed to follow. According to this, there should never have been an entry without a description field. The code for one of the GUI programs ASS-U-MEd this would be the case, didn't do any checking and of course crapped out when it found a malformed entry (someone obviously hadn't read the format info in the comments when the made changes).
Now of course the code should have been robust enough to handle such and error, but ideally there would have been some checking of the config file to determine whether the file actually conformed to the listed format rules before it was sent out into production.
These config files are where XML's strengths can be quite useful. If this file had a formal schema definition and was created in XML, it would be quite easy to check this config file for correctness (syntactical at least) as part of the build process. The code which reads these files could be changed to use a simple XML parser to read through it, or hell you could even write an XSLT transform to turn it into the "non-XML" format (i.e. use the XML for developing the file only) and not have to change any of the existing code that reads that file!
There's been a big push towards XML configuration files in some segments of the industry (the Java J2EE camp for example). I for one hope this trend will continue.
Every conforming ORB must implement IIOP (GIOP over TCP). Interoperability between ten major ORBs was tested and documented three years ago. If your vendor can't even handle that, they have little chance of getting Schema right.
For one thing, those more nasty of companies seems to have a lot more say in OASIS and ISO than in W3C. Nor can I look upon XML as a subset of SGML, but maybe I'm totally wrong about that.
In ISO, it seems like that cross-licensing of patents is done to shut smaller companies out of the process. OASIS too has RAND licensing and as usual, makes no attempt to define what is "reasonable" or "non-discriminatory":
This is contrary to how hard W3C has worked to ensure royalty-free patents.
I'm not saying that James Clark's stuff isn't better, it may well be, he is certainly among the foremost in this field. But this bashing of W3C seems highly undeserved.
Employee of Inrupt, Project Release Manager and Community Manager for Solid
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.
We all know embracing XML is to embrace simplicity.
If you're rolling your own tools, XML is a life saver.
I've built a shopping cart system for my wife's store, and XML forms a key part of several pieces of the internals.
For instance, UPS, US Postal Service and FedEx all have XML-based APIs that allow you to get shipping rates, track packages, generate labels, etc. In the case of rate retrieval, the XML is simple enough that I don't need XML code libraries: the weights and zipcodes get interpolated into a simple Perl string on the way out, and what I get back is easy enough to parse with a pattern (gotta remember non-greedy patterns!).
Obtaining a username and password is left as an exercise for the reader, as is parsing the result.
Her primary distributor, Ingram Books, is implementing inventory checks over XML also -- but it's not quite working yet. Their previous tools required FTP-ing a request file to a site, and then waiting around for a response file to show up in the same folder!
So in that respect, B2B is where XML is dominating.
Design for Use, not Construction!
It makes me laugh that the company that had a HUGE part in XSD's building doesn;t even use it in their own projects...
Try building XSD that you can use to import data into Access 2002 or SQL Server 2000.
You actually have to break your XSD just to get Access to recognize it... (MS Access 2002 "supports" creating it but not reading it)
Typical flippin M$!!!!
Yeah I know M$ sucks but I got little bitty customers as well as big customers...
Ooops!
it certainly lacks the immediacy of reading a DTD. Against that, of course, ... you XSD can express schemas which a DTD cannot describe (eg data types).
Better to be despised for too anxious apprehensions, than ruined by too confident a security. --Edmund Burke