all groups > dotnet xml > february 2005 >
You're in the

dotnet xml

group:

XSD Enumerations


XSD Enumerations Glenn
2/11/2005 3:11:56 PM
dotnet xml: 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

Re: XSD Enumerations Dino Chiesa [Microsoft]
2/11/2005 3:44:23 PM
xsd.exe supports W3C XML Schema incompletely.

Have you seen this tool?
http://www.microsoft.com/downloads/details.aspx?FamilyID=89e6b1e5-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



[quoted text, click to view]

Re: XSD Enumerations Glenn
2/14/2005 8:24:05 AM
Thanks Dino, I'll take a look.

Glenn
[quoted text, click to view]
http://www.microsoft.com/downloads/details.aspx?FamilyID=89e6b1e5-f66c-4a4d-
933b-46222bb01eb0&DisplayLang=en
[quoted text, click to view]

AddThis Social Bookmark Button