我们可以从 xsd 中的不同属性组中进行选择吗?



我们可以执行以下操作吗?如果没有,您能否指导我在xsd中选择属性组。

<xsd:complexType name="getGroupType">
    <xsd:choice minOccurs="1" maxOccurs="1">
            <xsd:attributeGroup ref="groupA"/>
            <xsd:attributeGroup ref="groupB"/>
    </xsd:choice>
</xsd:complexType>

xsd:choice称为模型组,只能与元素一起使用,不能与属性一起使用。但是,可以使用子类型(两种类型扩展基本类型)来模拟属性组上的选择。

最新更新