define attribute as NOT a member of enumerated type

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>
 
H

Henry S. Thompson

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>

I fear the only way to accomplish this is via an _extremely_ verbose
and tedious regexp :-(

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: (e-mail address removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top