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