1
xs:attributeGroup
要素のXSDスキーマがあります。XSD:属性に制限を追加するにはどうすればよいですか?
<xs:attributeGroup name="userAttrGroup">
<xs:attribute name="age" type="xs:integer" use="required"/>
<!-- Should be at least one of {status | address-type | country} -->
<xs:attribute name="status" type="xs:string" use="optional"/>
<xs:attribute name="country" type="xs:string" use="optional"/>
<xs:attribute name="address-type" type="xs:string" use="optional"/>
</xs:attributeGroup>
3つの属性に制限を加えたいとします。それは次のセットの少なくとも1つである必要があります{status, address-type, country}
。
XSDでこれを行うことはできますか?