XML Tutorial/XML Schema/minExclusive

Материал из Web эксперт
Перейти к: навигация, поиск

Element"s content must be greater than (and not equal to) the xsd:minExclusive value.

File: Schema.xsd
 
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.wbex.ru" xmlns="http://www.wbex.ru"
  elementFormDefault="qualified">
  <xsd:element name="start_date">
    <xsd:simpleType>
      <xsd:restriction base="xsd:date">
        <xsd:minExclusive value="1999-07-25" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:element>
</xsd:schema>
 
File: Data.xml
<?xml version="1.0"?>
 
<start_date xmlns="http://www.wbex.ru">1999-07-25</start_date>


minExclusive Defines the exclusive lower bound for a datatype with the ordered property

<xsd:simpleType name="lowerType">
  <xsd:restriction base="xsd:integer">
   <xsd:minExclusive value="99"/>
  </xsd:restriction>
</xsd:simpleType>