This post is a reminder to myself that not all mappings from XSD to programming languages are possible.
There are many impossible cases, so this is just a general reminder.
A Delphi specific case for instance is the mapping of enumerations: one reason is that XSD enumerations are case sensitive, but the Delphi language is not: [WayBack] Using XML Enumerations with Delphi XML Data Binding Wizard – Stack Overflow.
More generic examples from my answer to the above question:
- In XSD you can derive from an existing type in two ways: extending it and limiting it. Object Oriented languages only allow you extend when deriving.
- Delphi is not alone in these kinds of limitations. Generating wrappers from XSD schema’s is the field of specialized tools, even in the Java or .NET world.
I’ve seen horrible things with wildcards that are sort of mappable to Java, but not to C#. This could likely go on for much longer…
–jeroen