I am brand new to creating schema and almost brand new to creating XML. I am trying to develop a simple integer-based type (although I would settle for a string-based type) that restricts values to -1 and then even integers through 254.
So far I have figured out:
<xs:simpleType name="toffset">
<xs:restriction base="xs:integer">
<xs:minInclusive value="-1"/>
<xs:maxInclusive value="254"/>
</xs:restriction>
That code of course doesn't deal with restricting values >-1 to even integers. I considered creating an enumeration but that seems unwieldy for so many values. How can I achieve the desired restriction?