2013-01-11 15 views
1

我有這樣的XSD的xs:attributeGroup值限制

<xs:attributeGroup name="PropertyAttributes"> 
    <xs:attribute name="IsAttached" type="xs:boolean" default="false" /> 
    <xs:attribute name="IsStatic" type="xs:boolean" default="false" /> 
    </xs:attributeGroup> 

我想限制這種情況下 IsAttached =真IsStatic =真

我怎麼能做到這一點?

回答

1

在XSD 1.0中無法實現此功能;您必須移至XSD 1.1(我知道的Xerces是唯一免費提供的處理器,並且處於beta版狀態),或者使用Schematron擴展您的XSD 1.0模型(後者基於XSLT 1.0/2.0,您可以選擇使用嘉豪)。