0
給定不同的定義相同元素的模式定義,可以導入/包含這兩個定義並獨立於第三個模式定義中引用它們嗎?處理導入/包含XML模式時的元素衝突
例如,給定:
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:example:namespace">
<element name="message" type="boolean"/>
</schema>
和:
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:example:namespace">
<element name="message" type="date"/>
</schema>
可以構造如下:
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:example:namespace">
<complexType name="booleanMessageType">
<sequence>
<!-- reference to first definition here -->
</sequence>
</complexType>
<complexType name="dateMessageType">
<sequence>
<!-- reference to second definition here -->
</sequence>
</complexType>
</schema>