如何在XSD中定义全局



我想在XSD中将TEST定义为全局

<xs:element name="TEST">
<xs:complexType>
<xs:sequence>
<xs:element name="TEST_LOGIN" type="xs:string" />
<xs:element name="DOCUMENT" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>

顶级(xs:schema的子)组件定义本质上是全局可用的。

嵌套定义只能在本地使用,不能在其他地方引用。

参见

  • 如何在XSD中引用全局类型?
  • 如何在XSD中定义本地类型?

最新更新