W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

Re: which way is correct?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Sat, 7 Sep 2002 08:55:16 +0100
Message-ID: <1238111681.20020907085516@jenitennison.com>
To: "Y. Han" <yhan@uwo.ca>
CC: xmlschema-dev@w3.org


> Now I have two choices. The first one is
> The first one is nested , while the second is seperated. Which one
> is correct? or both are correct?

You actually have three choices -- the third choice is to declare the
elements globally and have anonymous (nested) types. These design
patterns are known as "Russian Doll", "Venetian Blind" and "Salami
Slice". You can learn more about them and their advantages and
disadvantages at:


My personal preference is to use a "Venetian Blind" pattern for most
of a schema, with elements declared locally where possible and types
declared globally. I don't think that the "Russian Doll" pattern is
particularly good, except for very small schemas, because it leads to
schemas that are hard to read (you lose track of where you are) and
hard to extend/redefine by others. But as with most things, a
judicious mix is probably the best policy.



Jeni Tennison
Received on Saturday, 7 September 2002 03:55:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:05 UTC