There are two primary points of contention I have with Chris's post. The first is the assumption that W3C XML Schema is descriptive enough to replace prose descriptions of the structure of an XML document. Many who've worked with W3C XML Schema can list several limitations inherent in the language that occur in XML document formats that cannot be expressed, here's five off the top of my head
  1. Specifying that an element or attribute cannot be from a particular namespace.

  2. Specifying that a choice of attributes that can appear on an element.

  3. Specifying that content models vary based on values of certain attributes or elements. For example, if the online attribute is true then the element should have a time-online child element otherwise should have a time-offline child element.

  4. Specifying that two elements at the same scope may have different types.

  5. Specify that certain elements can appear in any order without limitation on the how many times a particular element can appear.
Now let's assume that you have a document format that is simple enough that it doesn't stretch the capabilities of W3C XML Schema. Does this mean that one can use the having a schema makes a specification redundant? Why don't you be the judge of that, compare Jorgen Thelin's schema for RSS 2.0 to the RSS 2.0 specification. Which would you rather read if you wanted to create an application that processed RSS?

Specifically which would you trust about what to do if an RSS feed's item had two link elements? The prose specification implies that this shouldn't happen but the schema specifies that any child element of the item element can be repeated zero or more times. This reminds me some of the problems I face in my day job dealing with the discrepencies between the schema for Schema (sForS) and the actual prose of the specification. As Don said, folks are trying to make my hobby look like my day job.

A schema/grammar is a good companion to a specification but it isn't a replacement for one.
--
Get yourself a News Aggregator and subscribe to my RSSfeed

Disclaimer: The above comments do not represent the thoughts, intentions, plans or strategies of my employer. They are solely my opinion.
 

Categories:

Comments are closed.