Monday, April 23, 2012

Is it possible to specify a list length on an anonymous type?

I am converting an older data set to schema/xml. It contains a few elements that are arrays with default values. I am close to a solution with 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>


How can i limit the length of the list to 10? I.e., where in this would I put the



    <xs:length value="10">?




No comments:

Post a Comment