views:

514

answers:

2

Aloha

I received a few nice xsd files which I want to convert to classes (using xsd.exe) All the xsd's have the same includes, like this:

<xs:include schemaLocation="kstypes.xsd" />
<xs:include schemaLocation="ksparams.xsd" />

When I generate a class for each xsd the types declared in these files are duplicated for each original xsd. Is there any easy way to 1) only generate the types in the included xsd's once and 2) make sure all other classes use these types?

-Edoode

+1  A: 

Looking over the documentation, it would appear that the 'best' way (not an easy way!) would be to use the /element:elementname command line switch on the second and subsequent files to specify the types you want classes generated for.

Harper Shelby
I'll look into that, thanks
edosoft
+1  A: 

try the approach outlined here : http://hosca.com/blog/post/2008/12/26/Generating-C-classes-from-FpML-Schema.aspx

ehosca