I'm having a similar problem with the xsd I received from a third party. They're importing xml encryption type and I can't see wwhy xsd2code isn't seeing it. I've placed the imported xsd's in the same folder as the too-be generated one but no tool including
this one (it's reeeally awesome by the way) seems to be able to handle it. I keep getting an error message with "Error Type 'http://www.w3.org/2001/04/xmlenc#:EncryptedDataType' is not declared. SubType:Unspecified" message. I'm new to dealing directly
with xsd's and dtd's because tools like this are really easy to work with.
Notably, the XML Schema Explorer tool is able to see the imported xmlenc.xsd
Did you have any luck xanatos?