如何删除 xsd 中的以下警告。mymain.xsd 指的是 mysecond.xsd
我的 main.xsd
<?xml version="1.0" encoding="UTF-8"?><xsd:schema elementFormDefault="qualified" targetNamespace="http://abc.com" version="2.0" xmlns:tyu="http://abc.com" xmlns:my="def.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="def.com" schemaLocation="mysecond.xsd"/>
<xsd:complexType name="myType">
<xsd:complexContent>
<xsd:restriction base="my:myType">
<xsd:sequence>
<xsd:element minOccurs="0" name="rty" type="tyu:myagainType"/>
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="myagainType">
<xsd:complexContent>
<xsd:restriction base="my:myagainType">
<xsd:sequence>
<xsd:element minOccurs="1" name="uid">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
我的第二个.xsd
<?xml version="1.0" encoding="UTF-8"?><xsd:schema elementFormDefault="qualified" targetNamespace="def.com" version="2.0" xmlns:my="def.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="myagainType">
<xsd:sequence>
<xsd:element minOccurs="0" name="klo" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="myType">
<xsd:sequence>
<xsd:element minOccurs="0" name="rty" type="my:myagainType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
警告
Warning 1 Invalid particle derivation by restriction - 'Derived element 'http://abc.com:rty' is not a valid restriction of base element 'def.com:rty' according to Elt:Elt -- NameAndTypeOK.'. D:\files\mymain.xsd 3 4