472,986 Members | 2,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,986 software developers and data experts.

XSD Enumerations

I've been trying to generate enumerations with specific integer values using
an XSD and xsd.exe.

e.g

public enum AccessSecurity
{
Normal = 1,
Restricted = 100001
}

The values held in the enumeration map to fixed values in one of corporate
systems we're integrating and it would be nice to not have to perform a
mapping operation when we generate sql.

I've tried using simple type enumerations and then complex types with
xs:choice and setting a default value, but I can't get the xsd.exe to emit
what I want.

Any ideas where I going wrong, or is it just not possible?

Thanks

Glenn
Nov 12 '05 #1
2 1682
xsd.exe supports W3C XML Schema incompletely.

Have you seen this tool?
http://www.microsoft.com/downloads/d...DisplayLang=en

it works like xsd.exe but supports WXS enumeration types.
Maybe it will do the trick for you.

-Dino
--
Dino Chiesa
Microsoft Developer Division
d i n o c h @ OmitThis . m i c r o s o f t . c o m

"Glenn" <cs****@blackwinter.net> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...
I've been trying to generate enumerations with specific integer values
using
an XSD and xsd.exe.

e.g

public enum AccessSecurity
{
Normal = 1,
Restricted = 100001
}

The values held in the enumeration map to fixed values in one of corporate
systems we're integrating and it would be nice to not have to perform a
mapping operation when we generate sql.

I've tried using simple type enumerations and then complex types with
xs:choice and setting a default value, but I can't get the xsd.exe to emit
what I want.

Any ideas where I going wrong, or is it just not possible?

Thanks

Glenn

Nov 12 '05 #2
Thanks Dino, I'll take a look.

Glenn
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message
news:uf**************@TK2MSFTNGP12.phx.gbl...
xsd.exe supports W3C XML Schema incompletely.

Have you seen this tool?
http://www.microsoft.com/downloads/d...1e5-f66c-4a4d-
933b-46222bb01eb0&DisplayLang=en
it works like xsd.exe but supports WXS enumeration types.
Maybe it will do the trick for you.

-Dino
--
Dino Chiesa
Microsoft Developer Division
d i n o c h @ OmitThis . m i c r o s o f t . c o m

"Glenn" <cs****@blackwinter.net> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...
I've been trying to generate enumerations with specific integer values
using
an XSD and xsd.exe.

e.g

public enum AccessSecurity
{
Normal = 1,
Restricted = 100001
}

The values held in the enumeration map to fixed values in one of corporate systems we're integrating and it would be nice to not have to perform a
mapping operation when we generate sql.

I've tried using simple type enumerations and then complex types with
xs:choice and setting a default value, but I can't get the xsd.exe to emit what I want.

Any ideas where I going wrong, or is it just not possible?

Thanks

Glenn


Nov 12 '05 #3

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

Similar topics

1
by: Joyce | last post by:
In my schema I have 2 enumerations, let's say, country description and country code, and I want to use them so I can map each country description to its precise country code (and no other). So far...
0
by: Plinkerton | last post by:
I'm making an Base Class that will be inherited. In my base class, I have a public enumeration that defines a list of things I want my class to be able to do. I use it for Method input...
21
by: Christopher Benson-Manica | last post by:
I'll try to explain what I want to do: I have foo.h and foo.cpp. Units that include foo.h will define an enumeration bar: enum bar { typeNone, typeBaz, typeQuux, ... , count }; A method...
3
by: JoeH | last post by:
Hi, I'm using a COM DLL (created in VB) in my javascript code and can successfully call its methods and get/set its properties. There are also some Public enumerations defined in the ActiveX...
5
by: Seamus M | last post by:
I can't find any info on enumerations in the PHP manual, so I assume there is no built in way to create them. Can anyone tell me the best way to build a simple enumeration, such as: Enum...
1
by: someone else | last post by:
I have some code that creates dynamic enumerations for use in a PropertyGrid control. This all works perfectly but the memory usage of the program increases quite quicly when viewing the...
1
by: Oleg Ogurok | last post by:
Hi all, I've added a new DataSet (xsd file) to my project in VS.NET 2003. There I create a simple type as an enumeration of values. <xs:simpleType name="MyCustomType"> <xs:restriction...
4
by: ChrisB | last post by:
Hello: I will be creating 50+ enumerations related to a large number of classes that span a number of namespaces. I was wondering if there are any "best practices" when defining enumerations. ...
27
by: Ben Finney | last post by:
Antoon Pardon wrote: > I just downloaded your enum module for python > and played a bit with it. IMO some of the behaviour makes it less > usefull. Feedback is appreciated. I'm hoping to...
77
by: Ben Finney | last post by:
Howdy all, PEP 354: Enumerations in Python has been accepted as a draft PEP. The current version can be viewed online: <URL:http://www.python.org/peps/pep-0354.html> Here is the...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.