Sample schema for testing interaction of substitution groups and UPA 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 particles for e and e1 do not compete, and the content model is legal. 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 particles do compete. So in 1.1 this schema is definitely non-conforming.

CMSMcQ, 17 June 2010.