468,720 Members | 1,579 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,720 developers. It's quick & easy.

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 1534
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Plinkerton | last post: by
21 posts views Thread by Christopher Benson-Manica | last post: by
3 posts views Thread by JoeH | last post: by
5 posts views Thread by Seamus M | last post: by
1 post views Thread by someone else | last post: by
1 post views Thread by Oleg Ogurok | last post: by
4 posts views Thread by ChrisB | last post: by
77 posts views Thread by Ben Finney | last post: by
1 post views Thread by Oskars | last post: by
9 posts views Thread by bryonone | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.