Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > define attribute as NOT a member of enumerated type

Reply
Thread Tools

define attribute as NOT a member of enumerated type

 
 
David
Guest
Posts: n/a
 
      03-01-2006
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>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to define operator "const char *" of enumerated type defined inside a class Bill Davy C++ 6 09-25-2008 09:28 AM
#define ALLOCIT(Type) ((Type*) malloc (sizeof (Type))) Yevgen Muntyan C Programming 10 02-13-2007 02:52 AM
define attribute as NOT a member of enumerated type davidmcb@pacbell.net XML 1 03-06-2006 05:16 AM
Redefining an enumerated attribute type Nick Bassiliades XML 1 12-12-2005 01:21 PM
How to obtain enumerated attribute declarations from a DTD using MSXML & VB? Alastair Cameron XML 1 07-04-2003 03:03 PM



Advertisments