I enjoy coming across and reading Rick Strahl's blog every now and then. He has posted free tools up on his site and his indepth articles are also invaluable (one of my favorites was one he wrote back in 2005 on ASP.NET Architecture. He is also very capable of creating blog entries that generate an immense amount of discussion.
I came across his latest blog entry on "XSD.EXE and included schemas". In his post, there was mention that "Looking at XSD.EXE I don't see anyway to specify the whole lot of files to import and apparently XSD.EXE doesn't look at the includes which look something like this:".
Sure enough, based on the documentation (see command prompt below), it can be difficult to determine what is/is not supported.

While reading about his troubles, I thought this would be another great opportunity to make use of Lutz Roeder's .NET Reflector (the individual that Carl and Richard on the DNR podcast show have referred to as God). I blogged about the different motivation factors of using Reflector in a previous entry. After loading up XSD.EXE in Reflector and taking a peek at the internals, in the Run method of XsdTool.Xsd, it appeared to support the import of several xsd files as generated classes.
To confirm this, I performed the following steps:
1. Create [XmlSchema1].xsd and [XmlSchema2].xsd
2. Opened up command prompt and executed the following command: xsd XmlSchema1.xsd XmlSchema2.xsd -c
The output file is generated. In this case, it contained two classes.
This may still not fit Rick's requirement and ideally, it would have been great if his first scenario of having one schema with specifying includes had behaved intelligently. However, hopefully, this clarifies some of the question marks with XSD's help. One of the comments in the blog entry mentioned of an alternate tool called CodeXS. I'll have to take a look at it and check out the similarities/differences in code base and functionality.
While on the topic of Reflector, it may be of interest to see which exe and dlls in .NET are managed code with CLI headers and which are not. Not surprisingly, aspnet_regiis, setreg and sn do not contain CLI headers. Meanwhile, it's interesting to note that InstallUtil and WebDev.WebServer are both managed code (WebDev, the ASP.NET 2.0 host, NOT to be confused with WebDAV, IETF approved and original vision for WWW beyond GET and POST methods). See below for a subset of components of interest:
