【发布时间】:2022-01-19 09:28:57
【问题描述】:
我正在使用两个架构文件,parent.xsd 和 child.xsd,其中包括父架构。
在父级内部,我已经通过以下方式定义了一个非常简单的元素
<xs:element name="parentElement">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element ref="another_element" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="firstAttr" type="attrType"/>
</xs:complexType>
</xs:element>
现在,在子架构中,我想覆盖这个元素并添加一个新属性。孩子应该与父母同名。这可以在 XSD 中完成吗?
我已经尝试过
【问题讨论】: