How could I do something like this in a XML schema?
I want to mass create some users and I want to set the users timezone automatically. However I am using timezones generated by this
Dictionary<string, TimeZoneInfo> storeZoneName = TimeZoneI开发者_JAVA百科nfo.GetSystemTimeZones().ToDictionary(z => z.DisplayName);
So I need the names to be exactly like the ones this list returns. So can I put like a constraint on that xml node that the name has to exactly match one of the names.
So I am guessing I will need to write this list somewhere in the file and that's what I am not sure if you can do something like that in a schema.
If it is a predefined list of values you'll want to use XSD Enumerations.
See links below:
xml.com
w3c.org
精彩评论