The xsd:maxInclusive facet specifies the highest possible value for an element. : maxInclusive « XML Schema « XML Tutorial






<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.java2s.com" xmlns="http://www.java2s.com"
  elementFormDefault="qualified">

  <xsd:element name="population">
    <xsd:simpleType>
      <xsd:restriction base="xsd:integer">
        <xsd:maxInclusive value="5000" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:element>

</xsd:schema>
 

File: Data.xml
 
<?xml version="1.0"?>
<population xmlns="http://www.java2s.com">4999</population>








3.69.maxInclusive
3.69.1.The xsd:maxInclusive facet specifies the highest possible value for an element.
3.69.2.maxInclusive Defines the inclusive upper bound for a datatype with the ordered property