define attribute as NOT a member of enumerated type

Discussion in 'XML' started by David, Mar 1, 2006.

  1. David

    David Guest

    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>
    David, Mar 1, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alastair Cameron
    Replies:
    1
    Views:
    1,571
    Colin Mackenzie
    Jul 4, 2003
  2. Nick Bassiliades

    Redefining an enumerated attribute type

    Nick Bassiliades, Dec 9, 2005, in forum: XML
    Replies:
    1
    Views:
    430
    Henry S. Thompson
    Dec 12, 2005
  3. Replies:
    1
    Views:
    366
    Henry S. Thompson
    Mar 6, 2006
  4. Yevgen Muntyan

    #define ALLOCIT(Type) ((Type*) malloc (sizeof (Type)))

    Yevgen Muntyan, Feb 9, 2007, in forum: C Programming
    Replies:
    10
    Views:
    880
    Yevgen Muntyan
    Feb 13, 2007
  5. Bill Davy
    Replies:
    6
    Views:
    679
    James Kanze
    Sep 25, 2008
Loading...

Share This Page