xs:minExclusive defines a minimum value that cannot be reached : minExclusive « XML Schema « XML






xs:minExclusive defines a minimum value that cannot be reached


File: Data.xml


<?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="data" type="strictlyPositive"/>

  <xsd:simpleType name="strictlyPositive">
    <xsd:restriction base="xsd:double">
      <xsd:minExclusive value="0" />
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>


File: Schema.xsd


<?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="data" type="strictlyPositive"/>

  <xsd:simpleType name="strictlyPositive">
    <xsd:restriction base="xsd:double">
      <xsd:minExclusive value="0" />
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>

 








Related examples in the same category