473,569 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSD does not output a "Union" SimpleType

hello group:

The following is a fragment from a schema which defines the
EWethnicCategor yStructure type. As you can see, its type is defined by the
SimpleType enumeration EWethnicCategor yType.
EWethnicCategor yType is defined as a union with the CommonEthnicCat egoryType
SimpleType enumeration.

Now when I use the XSD tool to create a C# class of this schema, the
resulting code does not include the SelectedEthnicC ategory enumeration.
However, when I change its type to CommonEthnicCat egoryType, I at least get
the CommonEthnicCat egoryType enumeration.

What is going wrong?
What do I need to output the entire union defined by EWethnicCategor yType?

Thanks

=============== =============== =============== =============== ============

<xsd:element name="EWethnicC ategory" type="EWethnicC ategoryStructur e"/>
<xsd:complexTyp e name="EWethnicC ategoryStructur e">
<xsd:sequence >
<xsd:element name="SelectedE thnicCategory" type="EWethnicC ategoryType">
<xsd:annotation >
<xsd:documentat ion>The Ethnic category selected from the available
list</xsd:documentati on>
</xsd:annotation>
</xsd:element>
<xsd:element ref="OtherSpeci fiedEthnicCateg ory" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType >
<xsd:element name="OtherSpec ifiedEthnicCate gory"
type="core:Popu latedStringType ">
</xsd:element>
<xsd:simpleTy pe name="EWethnicC ategoryType">
<xsd:union memberTypes="Co mmonEthnicCateg oryType">
<xsd:simpleType >
<xsd:restrictio n base="xsd:strin g">
<xsd:enumeratio n value="British"/>
</xsd:restriction >
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
<xsd:simpleTy pe name="CommonEth nicCategoryType ">
<xsd:annotation >
<xsd:documentat ion>Ethnic categories used by all areas (except Northern
Ireland which has completely different list)</xsd:documentati on>
</xsd:annotation>
<xsd:restrictio n base="xsd:strin g">
<xsd:enumeratio n value="Irish"/>
<xsd:enumeratio n value="Other White"/>
<xsd:enumeratio n value="White &amp; Black Caribbean"/>
<xsd:enumeratio n value="White &amp; Black African"/>
<xsd:enumeratio n value="White &amp; Asian"/>
<xsd:enumeratio n value="Other Mixed"/>
<xsd:enumeratio n value="Indian"/>
<xsd:enumeratio n value="Pakistan i"/>
<xsd:enumeratio n value="Banglade shi"/>
<xsd:enumeratio n value="Other Asian"/>
<xsd:enumeratio n value="Caribbea n"/>
<xsd:enumeratio n value="African"/>
<xsd:enumeratio n value="Other Black"/>
<xsd:enumeratio n value="Chinese"/>
<xsd:enumeratio n value="Any Other"/>
<xsd:enumeratio n value="NOT STATED"/>
</xsd:restriction >
</xsd:simpleType>


Nov 12 '05 #1
0 1323

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

Similar topics

10
12822
by: KENNY L. CHEN | last post by:
Dear experts, I have two tables in my Oracle 8i database: TEST (COL1,COl2,REC_NO) and TEST1 (COL1,COL2,REC_NO). Both tables are unique-indexed on (COL1,COL2,REC_NO). I think the following SQL commands will return the same result but one of my friends don't think so. He said "QUERY 1" will return 1 unsorted record (ROWNUM < 2 ) first...
0
1648
by: Marek Lewczyk | last post by:
Hello, Currently I'm testing my app using MySQL 4.1.0 version, and I have a strange error during execution a union query. (SELECT IF(_DAT.pri <=> null, null, ROUND(_DAT.pri/1.22)) AS pri_net, IF(_DAT.pri <=> null, null, ROUND(_DAT.price*1)) AS pri_gross, _DAT.cuid, _CUR.code FROM tab1 _DAT, tab2 _CUR WHERE _DAT.eid = '6925' AND _DAT.did =...
5
4117
by: Taylor Howell | last post by:
Hello all, I have a delima. I have 8 5bit numbers that I need to pack into one (or more) variables. They then must be written (exactly 40bits (5Bytes)) to a file and have the ability to be put back into memory and then get the 5bit numbers out again. As I am not by any means proficient in C++ (still learning) I don't know how to go about...
2
5332
by: thomasfj | last post by:
Hi, Accroding to MS documentation the use of union and list elements in XSD simpleType (valid according to W3C standards) is valid used as an dataset schema...but it's not!! When loading the schema (ReadXmlSchema method) you get this error message: doesn't support 'union' or 'list' as simpleType
1
7768
by: CrystalDBA | last post by:
I usually design applications in SQL Server and Crystal Reports. I now need to create a crystal report on an MS Access database. I have two tables: Services: Date datetime Entry text Amount number (should be 4 records)
3
1435
by: usr.root | last post by:
hi,who knows how does the compiler work after it see the "union" word in your code .
4
5969
by: Yair | last post by:
Hi, I need to shift the bits of a float type. In order to do so, I declared the following struct: private struct unionIntFloatType { public float m_asFloat;
6
2187
by: Bob Altman | last post by:
Hi all, I'm struggling to do something really basic. How do I declare a structure that has a union that maps an array of 3 chars with 3 distinct char variables. In other words, I want the following two statements to put the same value into the same byte in the structure: myStruct.Vars = 5; myStruct.Var1 = 5;
1
1692
by: benn686 | last post by:
Id like to group 16 booleans into a u16 such that I can either set all 16 variables at once with just a single u16 assigment, or I can individually change a bit by setting that boolean manually. Either way, the same 16 bits is occupied in memory. Something like... typedef struct { bool bSetLed15;
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7979
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.