brdrok
asked on
Restrictions on attribute values
Hi,
XML and XSD newbie here. Is it possible to restrict the values of an attribute? Below is my try #1 but it doesn't work.
......
......
<xs:attribute name="intHour" type="xs:int" use="required" >
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="23"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
how can I make intHour only accept values from 0 to 23?
Many thanks...
XML and XSD newbie here. Is it possible to restrict the values of an attribute? Below is my try #1 but it doesn't work.
......
......
<xs:attribute name="intHour" type="xs:int" use="required" >
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="23"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
how can I make intHour only accept values from 0 to 23?
Many thanks...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
welcome
ASKER
always great to have another pair of eyes looking at stuff =)
Thanks