XSD Schemas can be split across multiple files using the xs:include, xs:import, xs:redefine and xs:override nodes. Breaking a large schema down into multiple files can increase re-use and make maintenance simpler.
However, it can sometime cause problems for some less compliant applications, which can not properly interpret these additional files. For this reason we provide a tool which will collapse a hierarchy of XML Schema files down into a single XSD file.
The tool is available on the tools menu when an XSD is open (), when selected it will flatten the current schema into a new file which you can then save in a suitable location.
|You can view the structure of the XSD Hierarchy using the XSD Dependency Viewer. This will show a tree of all the XSD files that the current schema uses.|
The W3C XSD standard allows schemas elements to be defined within multiple namespaces. This is achieved by setting the targetNamespace attribute within the xs:schema element. This has the effect of making everything defined within the schema part of this targetNamespace. If schema set uses multiple targetNamespaces then their is no way to correctly collapse this into a single file. The behavior of xs:redefine and xs:override are also impossible to correctly replicate within a single file. As a result of this xs:import, xs:redefine and xs:override nodes are not collapsed, and are added into the file unchanged.