Sample schema for testing interaction of substitution groups and EDC constraint. Modelled on the example given by Sandy Gao in bug 4337 Substitution group and abstract.

If the processor pays attention to the fact that the top-level e1 element cannot appear in an instance, and thus cannot be in the actual substitution group of e, it may conclude that in type T, the top-level e1 element is not implicitly present in the content model. On that analysis, the content model satisfies the Element Declarations Consistent constraint.

XSD 1.0 appears to require the judgement that the content model is legal, since it excludes e1 from the actual substitution group of e. (In the bug report, however, Sandy Gao argues that 1.0 is unclear, which suggests that he believes 1.0 can also be read as allowing the other judgement.)

XSD 1.1 makes clear that the top-level e1 element is in the substitution group of e and therefore that the schema is non-conforming.

CMSMcQ, 17 June 2010.