D
davidmcb
I have defined an enumerated type that I use in various places in my
schema. I am in the process of creating a new complex type that
contains an attribute that I want to restrict to NOT being a member of
the enumerated type. Is this possible? How?
For example:
<!-- enumerated type-->
<xs:simpleType name="myEnumeration">
<xs:restriction base="xs:string">
<xs:enumeration value="blah1"/>
<xs:enumeration value="blah2"/>
<xs:enumeration value="blah3"/>
</xs:restriction>
</xs:simpleType>
<!-- complex type with attr NOT a member of the above enum-->
<xs:complexType name="someNewType">
<xs:sequence>
<xs:element name="newtype">
<xs:complexType>
<xs:all>
<xs:element name="alias" type="xs:string"/>
</xs:all>
<!-- *** here's where I want to say 'type != ' *** -->
<xs:attribute name="name" type!="myEnumeration"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
schema. I am in the process of creating a new complex type that
contains an attribute that I want to restrict to NOT being a member of
the enumerated type. Is this possible? How?
For example:
<!-- enumerated type-->
<xs:simpleType name="myEnumeration">
<xs:restriction base="xs:string">
<xs:enumeration value="blah1"/>
<xs:enumeration value="blah2"/>
<xs:enumeration value="blah3"/>
</xs:restriction>
</xs:simpleType>
<!-- complex type with attr NOT a member of the above enum-->
<xs:complexType name="someNewType">
<xs:sequence>
<xs:element name="newtype">
<xs:complexType>
<xs:all>
<xs:element name="alias" type="xs:string"/>
</xs:all>
<!-- *** here's where I want to say 'type != ' *** -->
<xs:attribute name="name" type!="myEnumeration"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>