XSD - cvc-elt.4.2: 无法将“{1}”解析为元素“{0}”的类型定义

XSD - cvc-elt.4.2: Cannot resolve ''{1}'' to a type definition for element ''{0}''

我正在尝试根据我的 xsd 架构验证 xml 文件。

XSD 架构:

   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
               xmlns:myType="http://iso.org/my/type/myType"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               targetNamespace="http://iso.org/my/type/myType"
               elementFormDefault="qualified" version="1.0.0">
...
<xsd:complexType name="MyComplexType">
    ....
</xsd:complexType>

XML 文件:

<otx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:myType="http://iso.org/my/type/myType"
     xmlns="http://iso.org/my/type" id="someId" name="someName" package="somePackage" timestamp="....." version="1.0.0">
....
<realisation xsi:type="dataType:MyComplexType">
   <dataType:elements>
       ...
   </dataType:elements>
</realisation>

但我总是收到Cannot resolve 'dataType:MyComplextType' to a type definition for element 'realisation'.

文件应该在正确的目录中,有人知道吗,出了什么问题?或者可能出了什么问题?

命名空间前缀数据类型尚未声明。尝试

xsi:type="myType:MyComplexType"