我的问题是如何定义将验证以下示例XML的XML模式:
<rules>
<other>...</other>
<bool>...</bool>
<other>...</other>
<string>...</string>
<other>...</other>
</rules>子节点的顺序并不重要。子节点的基数是0..unbounded。
rules节点的所有子元素都有一个公共基类型rule,如下所示:
<xs:complexType name="booleanRule">
<xs:complexContent>
<xs:extension base="rule">
...
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="stringFilterRule">
<xs:complexContent>
<xs:extension base="filterRule">
...
</xs:extension>
</xs:complexContent>
</xs:complexType>下面是我当前为rules节点定义架构的尝试。然而,
xs:choice xs:sequence**?中嵌套如果,我应该在哪里指定** maxOccurs="unbounded" 属性?xs:sequence ?
发布于 2010-04-23 11:39:35
maxOccurs="unbounded"。例如,你可以把它放到xs:choice上(我想这就是你想要的)。ogc:expression是一个抽象的基元素,可以用不同的具体表达式(ogc:Add等)代替。https://stackoverflow.com/questions/2695625
复制相似问题