Subject:Restricting on an extended type Author:Simone Milani Date:24 Sep 2007 12:15 PM
Thanks Ivan,
What I was actually asking was is whether my schema is actually a valid schema and if doing that type of restriction is actually OK. I checked the spec and could not really work out if it's a valid restriction. Any ideas on which part of the XSD spec (if any) would cover my restriction scenario?
<<"A complex type derived by restriction is very similar to its base type, except that its declarations are more limited than the corresponding declarations in the base type. In fact, the values represented by the new type are a subset of the values represented by the base type (as is the case with restriction of simple types). In other words, an application prepared for the values of the base type would not be surprised by the values of the restricted type.">>
UserReference is defined as substitution of SystemReference, because UserReference can safely replace any instance of SystemReference without breaking the data model, the type extension is valid.
An example of incorrect extension would be changing the cardinality