- From: Chuck Paussa <cpaussa@myrealbox.com>
- Date: Mon, 13 May 2002 12:59:59 -0700
- To: xmlschema-dev <xmlschema-dev@w3.org>
Is it possible to define a list which contains more than one type in sequence? These types are from the FO spec What I'd like to do is define a list which has types <length> <length> <length> <precedence> <conditionality> What I have, which works, is as follows <!-- A compound datatype, with components: minimum, optimum, maximum, precedence, and conditionality. The minimum, optimum, and maximum components are <length>s. The precedence component is either "force" or an <integer>. The conditionality component is either "discard" or "retain". --> <simpleType name = "space_Type"> <restriction base = "string"> <pattern value = "[+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+ discard"/> <pattern value = "[+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+ retain"/> <pattern value = "[+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] force discard"/> <pattern value = "[+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] [+]?\d+[\.]?\d*[p|m|i|c|e][x|t|m|n] force retain"/> </restriction> </simpleType> What I'd like is something like <xs:simpleType name="space_Type"> <xs:restriction> <xs:simpleType> <xs:list> <xs:simpleType> <xs:restriction base="fo:length_Type"/> <xs:restriction base="fo:length_Type"/> <xs:restriction base="fo:length_Type"/> <xs:restriction base="fo:precedence_Type"/> <xs:restriction base="fo:conditionality_Type"/> </xs:simpleType> </xs:list> </xs:simpleType> <xs:minLength value="1" /> <xs:maxLength value="2" /> </xs:restriction> </xs:simpleType> Chuck
Received on Monday, 13 May 2002 15:54:21 UTC