SimpleType not enforced for extended element

Karl Stubsjoen <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <CAHL+Fe3Vra_Zd+BiVgdNfmjDPi3t1MnV0qzf2v_V64y_+cCZYA@mail.gmail.com>
I have an element that extends a complex type but the additional
attribute with a simple type definition is not being enforced.  The
attribute is enforced, just not it's simple type.  Have I defined
something incorrectly?  Here they are:

<!-- to be used in extension below -->
    <xs:complexType name="ProjXm_QueryType">
        <xs:sequence>
            <xs:element ref="command"/>
            <xs:element ref="parameters"/>
            <xs:element ref="fields" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>


<!-- extends the above and adds a name attribute of specified simple type -->
    <xs:element name="SharedDB">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="ProjXm_QueryType">
                    <xs:attribute name="name"
type="simpleType_SharedDBQueries" />
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

<!-- expected values for name attribute ->
    <xs:simpleType name="simpleType_SharedDBQueries">
        <xs:restriction base="xs:NCName">
            <xs:enumeration value="insert"/>
            <xs:enumeration value="update"/>
        </xs:restriction>
    </xs:simpleType>


<!-- sample xml (snipped) -->
    <SharedDB>
        <command>
            <name>insertxx</name><!-- would expect validation to fail here -->
            <type>StoredProcedure</type>
            <action>NonQuery</action>
        </command>
        <parameters>
    ...
    </SharedDB>


Thanks,
Karl..
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.