有没有办法定义一个常量值并在前面的XSD中使用该常量?我有一个共同的价值,我想用于各种xs:元素标签的maxOccurs属性。与其他语言中的常量一样,如果MyConst的值有变化,我想在一个地方进行更改。如何在XSD中定义常量
<!-- Can I do this? -->
<ConstantValue id="MyConst" value="10"/>
...
<xs:element name="sandwich_meat" type="xs:string" minOccurs="0" maxOccurs="MyConst"/>
<xs:element name="sandwich_name" type="xs:string" minOccurs="0" maxOccurs="MyConst"/>