To learn about XML/XSD, w3cschool is a good place, especially just getting started.
Back to include and import issues. http://www.w3schools.com/Schema/schema_elements_ref.asp
- Import can introduce different schemas of targetnamespace into a file.
- Include can introduce the same schema of targetnamespace into a file.
Therefore, you must pay attention to your targetnamespace. It is best to determine at the beginning that you want to use that method to introduce and load other schemas.
========================================================== ============================
Digress:
Castor is used in our project to generate Java based on XSDCode.
Castor supports import and include.
We only tested include. If the include schema in XSD has different targetnamespace, Castor will prompt you and cannot generate code.
It's too late today. I will try again later.
Here is a good article about Castor and import.Article.
Http://docs.codehaus.org/display/CASTOR/Multiple+namespaces+for+the+source+generator