Wiki Home

Schemas For XML

Namespace: WIN_COM_API
I'm reading up on Xm L now that I heard so much more about it at DevCon. I'm covering DTDs now, but I heard Ken Levy say that they would be replaced by Schemas some time in the near(?) future. Can anybody tell me where I could find more info on them? Thanks
Well, I guess I'll answer my own question. The book I got is called XML Design and Implementation by Paul Spencer, and he has included an Appendix on Schemas saying that they are still in the proposal stage.
If anybody knows of any other sources, I'd still be interested in them. -- Scott Dinwiddie
"XML Specification Guide" (Graham and Quin, Wiley, ISBN 0471327530 ), Appendix F is titled "Schema or DTD". The basic message is that a schema is written in regular Xm L markup rather than the specific, different, hard-to-learn DTD syntax. So instead of:

[!DOCTYPE customer [
[!ELEMENT customer (custId, name, order*)
[ATTLIST customer
active (yes|no) yes
[!ELEMENT order ... ]

You might have something more like this:

[define-doctype name="customer"]
..[define-element name="customer"]
....[attribute name="active" default="yes"]
..[define-element name="order"]
.... blah, blah, blah...

Now I made all of that up, which is one of the problems right now--what is the required syntax for a schema? Essentially there must be a DTD for the schema. This would constitute a standard, and I understand several different ones have been proposed. Until then there are very few tools that can handle these. So you can't just use your favorite validating parser.

On the positive side, these will be much easier to learn once there is a standard--they are just plain Xm L. And you'll be able to edit them with an Xm L editor, rather than needing a tool that knows DTD syntax (or Notepad :)). Further, they are extensible, so you can put additional descriptive attributes in your language description, for example.

You can think of this sort of like a STRUCTURE EXTENDED table in xBase. It allowed us to define the structure of one table as another table of the same file format. Thus you could BROWSE it, REPLACE it, etc., rather than having to learn a completely different set of tools for dealing with the metadata.
-- Randy Pearson

Thanks for the info, Randy. -- Scott Dinwiddie
Standardizing data definitions looks to me like a fundamental problem of Xm L (and, incidentally, everything else). For data sharing to become universal, there needs to be some agreement on structures. While researching the problems posed in Category Fox Forum XML, I found nothing at all about data definition proposals. It's all in the hands of nascent committees. Right. I'm not holding my breath that Xm L will be truly meaningful anytime soon.-- Steven Black
The above-referenced book mentions XSchema, XData / DSD, and DCD/DCF/RDF as leading candidates that have been proposed. I have not looked at these. I too am not holding my breath. -- Randy Pearson
I think some people (Ken maybe {gd&r}) are making way too much out of Xm L and what it can and will do. Xm L is immensely powerful even if you don't apply the all-encompassing aspects that some try to make it out to be.
I'm working on a project where an Xm L data definition would be incredibly useful. I've seen people struggling with coming to terms in defining what a standard should be. Big players too, but even there agreement is not something that does just happen. Without that agreement you're back to converting data the old fashioned way by looking at it and writing code to map it, ie. non-generic translations.

However, at least Xm L provides a common data format. in this respect, it's sort of like at some point deciding that everyone will use DBF files as a database file format - or access or comma delimited text - it doesn't really matter what, just that everybody uses it. In that respect you can easily translate the data, just like you could easily run a select statement against an unknown structure dbf file to map fields. Add to that Xs L which can provide internal mapping and a common parser and you have the minimal capability to easily share data.

To think that just because Xm L exists that everybody will be able to send anybody else an Xm L document and expect that to work seamlessly anytime soon is dreaming... - Rick Strahl
Category XML
( Topic last updated: 1999.06.23 09:57:27 PM )