Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: What comes first, the schema or the document

From: Boris Kolpackov <boris@-------------.--->
To: xmlschema-dev@--.---
Date: 7/14/2008 10:42:00 AM
Hi,

Michael Kay <mike@s...> writes:

> 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.

That only works for fairly simple vocabularies. As soon as you start having
choices, optional/sequence elements/attributes, the number of separate
instances required to "show" the vocabulary becomes unmanageable. Plus this
approach has a negative side effect of people stopping to care how their
schemas look since nobody is supposed to look inside.

I think for any non-trivial vocabulary it is better to start with a clean
and readable schema right away and maybe have one or two sample instance
documents that showcase the most common scenarios.

Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde

From boris@c... Mon Jul 14 07:10:16 2008
Received: from [128


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent