<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xs:element name="outer">
        <xs:complexType>
            <xs:choice>
                <xs:element ref="MySub"/>
                <xs:element ref="MyBadSub"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <xs:element name="MySub" abstract="true"/>
    <xs:element name="MyBadSub" type="xs:string" block="substitution"/>
    <xs:element name="innerValid" substitutionGroup="MySub" type="xs:string"/>
    <xs:element name="innerInvalid" substitutionGroup="MyBadSub" type="xs:string"/>
</xs:schema>
