0
我想制作一个模式,其中元素的类型由父级属性的值确定。特别是,我想要做的是这样的XML架构:基于子元素类型的属性值?
<argument name="foo" type="float">5.6</argument>
其中参数的值应执行以符合浮点值。因此,value元素的类型是由argument
元素的属性定义的类型。
现在,我找到了一个older post on the topic它声明这不能在XML-Schema 1.0中完成。
所以我的问题是, 有没有推荐的替代方法去做?我能想到的最接近的是让像
<argument name="foo">
<float>5.6</float>
</argument>
让argument
包含的类型type
的元素,然后让float
从type
的。
` 5.6 floatArgument>`? –
delnan
2011-01-28 15:58:53