无法将名称“ eanucc:MeasurementUnitCodeType”解析为(n)“类型定义”组件

时间:2019-02-17 17:01:46

标签: xsd

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cpg_direct_materials="urn:ean.ucc:align:cpg:cpg_direct_materials:2" xmlns:eanucc="urn:ean.ucc:2" xmlns:deliver="urn:ean.ucc:deliver:2" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="urn:ean.ucc:align:cpg:cpg_direct_materials:2" version="2.1">
   <xsd:annotation>
  <xsd:documentation>

  </xsd:documentation>
 </xsd:annotation>
 <xsd:import namespace="urn:ean.ucc:2" schemaLocation="../../ean.ucc/common/MeasurementUnitCode.xsd" />

<xsd:complexType name="RelationshipDependentItemDataType">
<xsd:sequence>
 <xsd:element name="tradeItemSpecificUnitOfMeasure" type="eanucc:MeasurementUnitCodeType" />
  <xsd:element name="tradeItemProductionLeadTime" type="eanucc:MeasurementValueType" minOccurs="0" />
 </xsd:sequence>
 </xsd:complexType>

在ean.ucc的公用文件夹中,带有以下代码的文件MeasurementUnitCode.xsd

 xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:eanucc="urn:ean.ucc:2" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="urn:ean.ucc:2" version="2.1">
<xsd:annotation>
  <xsd:documentation>
 </xsd:documentation>
 </xsd:annotation>
 <xsd:complexType name="MeasurementUnitCodeType">
  <xsd:sequence>
     <xsd:element name="measurementUnitCodeValue">
        <xsd:simpleType>
           <xsd:restriction base="xsd:string">
              <xsd:maxLength value="3" />
              <xsd:minLength value="1" />
           </xsd:restriction>
        </xsd:simpleType>
     </xsd:element>
  </xsd:sequence>
</xsd:complexType>
</xsd:schema>

出现错误 无法将名称“ eanucc:MeasurementUnitCodeType”解析为(n)“类型定义”组件。

主xsd位于文件夹“ cpg_direct_materials”(Align_ItemDataNotification.xsd)中,文件结构如下所示。

enter image description here

0 个答案:

没有答案