I have inherited a collection of 148 XSD files, and have been asked to generate a .Net assembly with types that represent those lais out in the XSDs. Several of these XSDs import others within the collection that represent common types. My first
attempt was with XSD.exe, but I had several problems with that, not the least of which was a real problem referencing external XSDs.
Then I found this wonderful post:
This helps a lot with the external XSDs, but doesn't help me very much in the fact that it assumes that all of the types are referenced in a single root schema. I am not so lucky, so I'm working on extending this code to do what I want.
Let's say I have three schemas (each with it's own unique namespace): common.xsd, general.xsd and specific.xsd:
common.xsd defines shared types: typea, typeb and typec
general.xsd imports common.xsd and provides complex types based on those: gentypex, gentypey and gentypez
specific.xsd imports both common.xsd and general.xsd and provides types that extend them: foo and bar
If I use the code in the link above, generating a code file for each xsd, then the types in common
View Complete Post