473,503 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

define attribute as NOT a member of enumerated type

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>

Mar 1 '06 #1
1 1700
da******@pacbell.net 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: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Mar 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2175
by: Alastair Cameron | last post by:
I have a VB (VB6, not .NET) application that reads an XML file (using MSXML v3.2 parser); the XML file contains a reference to an external DTD. The DTD has numerous enumerated attribute...
1
1552
by: Don Adams | last post by:
I would like to have the following XML: <phone type="work">555-123-1234</phone> <phone type="home">555-123-4321</phone> Is it possible to write a schema to restrict the contents of the type...
1
1612
by: GIMME | last post by:
Short version of question ... An xml file contains the following line ... <input type="label" text="fasdfad" css_tag="h1" /> The task is to convert it into <h1>fasdfad</h1>
0
340
by: David | last post by:
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...
0
1899
by: Pepe | last post by:
Hi, I'm very new in XML and am seeking advice for the following: My element DATA has a UNIT attribute that is an enumerated list. This tag stores medical measurements, such as volume of aire,...
7
2605
by: John Goche | last post by:
Hello, The following program compiler and runs fine under gcc and produces the output 3. However, I am not sure whether such behavior is legal. In particular, as a related question, how would I...
1
1597
by: senfo | last post by:
I'm using an enumerated type to identify a record type that relates to a unique ID in a database. Identity columns in SQL start at 1, while enumerated types in C# start at 0. I didn't think it...
0
2629
by: =?Utf-8?B?QXR1bA==?= | last post by:
When .Net 1.0 webservice (VS2003) generates a wsdl - <wsdl:binding name="TestSoap" type="tns:TestSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/(note:...
7
3035
by: Bill Davy | last post by:
I want to be able to write (const char*)v where v is an item of type Class::ToolTypeT where ToolTypeT is an enumeration and I've tried everything that looks sensible. There's an ugly solution, but...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.