W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2008

RE: What comes first, the schema or the document

From: Michael Kay <mike@saxonica.com>
Date: Fri, 11 Jul 2008 23:34:33 +0100
To: "'Lyallex'" <lyallex@gmail.com>, <xmlschema-dev@w3.org>
Message-ID: <7DE0C142C19E4E40916BAD9C37701DF8@Sealion>

> 
> The question is, when you are 'designing' a new xml 
> document/schema which do you do first ?
> 

I think it's very common for people to start with a sample instance and then
create a schema for it. In fact, the sample instance is often a better way
of communicating the structure than the schema itself.

Of course, with some structures, particularly recursive structures, you need
a set of examples showing different aspects of the model, you can't capture
everything in one instance. But examples are always easier to understand
than the formal rules, which means that instances are easier to understand
than schemas.

Michael Kay
http://www.saxonica.com/
Received on Friday, 11 July 2008 22:35:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:05 GMT