2
我正在将旧数据集转换为schema/xml。它包含一些具有默认值的数组。我接近xs:list的解决方案;是否可以指定匿名类型的列表长度?
<xs:element name="pressure"
default="0.22 0.33 0.44 0.55 0.66 0.77 0.88 0.88 0.88 0.88">
<xs:simpleType>
<xs:list>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0" />
<xs:maxInclusive value="2.0" />
</xs:restriction>
</xs:simpleType>
</xs:list>
</xs:simpleType>
</xs:element>
如何限制列表的长度为10?也就是说,我将
<xs:length value="10">?
实际上解决了这个问题,它解构了我对简单类型和重新嵌套匿名类型所进行的操作。为什么使用匿名类型?这是对我的要求。 – CAB 2012-04-17 16:12:25
您能否请您发布解决方案并将其标记为答案?这对谁最终会有所帮助 – MiMo 2012-04-19 10:32:27