2017-02-02 23 views
-1

我们可以做以下几点吗?如果不是,你能指导我在xsd中选择属性组吗?我们可以从xsd中的不同属性组中选择吗?

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

回答

0

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

相关问题