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

 
 
davidmcb@pacbell.net
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
 
 
 
 
Henry S. Thompson
Guest
Posts: n/a
 
      03-06-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) writes:

> 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 Removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
 
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 David XML 0 03-01-2006 01:11 PM
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