The reason is there are 4 xsd:schema in one file. I can not combine or
split them.
You can and you must split them. An XSD must be a well-formed XML document itself, and well-formed XML documents can only have a single root element.
Create a main XSD that uses xs:include
or xs:import
to bring in the other XSDs. Read more about the differences here. Examples follow...
Example using XSD include
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="1.xsd"/>
<xs:include schemaLocation="2.xsd"/>
<!-- ... -->
</xs:schema>
Example using XSD import
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://www.example.com/main"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.example.com/1" schemaLocation="1.xsd"/>
<xs:import namespace="http://www.example.com/2" schemaLocation="2.xsd"/>
<!-- ... -->
</xs:schema>