I would like to create an XML Schema that conforms to a list of principles. One of the principles is this:
Design the schema so it can be easily changed
when requirements change.
Consider a schema that uses a large inheritance tree (derive-by-extension and/or derive-by restriction). A change to complexType ABC impacts every complexType under ABC. If a requirement change applies only to ABC and not to any of its descendants (or applies to a subset of its descendants), then the schema is resistant to changes.
Assertion: Inheritance trees are evil. They create schemas that are resistant to changes. The deeper the inheritance tree, the more brittle the schema. Want schemas that are easily changed when requirements change? Then don’t use inheritance trees.
Next, consider a schema that declares an element XYZ to be mandatory (minOccurs="1"). If a requirement change says XYZ is optional, then XML instances that conform to the previous schema are suddenly invalid.
Assertion: Mandatory elements are evil. They create schemas that are resistant to changes. Want schemas that are easily changed when requirements change? Then don’t make elements mandatory.