xsd - XML Restriction number between range with exceptions -


let's i've like:

<xs:simpletype name="aye">         <xs:restriction base="xs:unsignedshort">             <xs:mininclusive value="32768"/>             <xs:maxinclusive value="65535"/>                     <!-- or, instances, 5, 15, 20 or 245 -->         </xs:restriction>  </xs:simpletype> 

is possible define simpletype restricts number between range [a,b] allows pre-defined numbers less a?

try following

    <xs:simpletype name="exceptions">         <xs:restriction base="xs:unsignedshort">             <xs:enumeration value="5" />             <xs:enumeration value="15" />             <xs:enumeration value="20" />             <xs:enumeration value="245" />         </xs:restriction>     </xs:simpletype>      <xs:simpletype name="range">         <xs:restriction base="xs:unsignedshort">             <xs:mininclusive value="32768"/>             <xs:maxinclusive value="65535"/>         </xs:restriction>     </xs:simpletype>      <xs:simpletype name="aye">         <xs:union membertypes="range exceptions" />      </xs:simpletype> 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -