1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-24 05:57:54 +03:00
libxml2/test/schemas/dur_0.xsd
Daniel Veillard 070803b315 patch Charles Bozeman for validation of all the date, time, and duration
* xmlschemastypes.c: patch Charles Bozeman for validation of
  all the date, time, and duration types
* test/schemas/dur_0* result/schemas/dur_0*: associated tests
* configure.in: fixed an error pointed by an user
* xml2-config.in: fixed an error pointed by an user
Daniel
2002-05-03 07:29:38 +00:00

74 lines
2.6 KiB
XML

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Testing duration data types
</xsd:documentation>
</xsd:annotation>
<xsd:element name="duration">
<xsd:complexType>
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element name="second1" type="xsd:duration">
<xsd:simpleType>
<xsd:restriction base="xsd:duration">
<xsd:maxExclusive value="PT1S"/>
<xsd:minExclusive value="PT0.1S"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="second2" type="xsd:duration">
<xsd:simpleType>
<xsd:restriction base="xsd:duration">
<xsd:maxInclusive value="PT1S"/>
<xsd:minInclusive value="PT0.1S"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="month1" type="xsd:duration">
<xsd:simpleType>
<xsd:restriction base="xsd:duration">
<xsd:maxExclusive value="P1M"/>
<xsd:minExclusive value="P0M"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="month2" type="xsd:duration">
<xsd:simpleType>
<xsd:restriction base="xsd:duration">
<xsd:maxInclusive value="P1M"/>
<xsd:minInclusive value="P0M"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="month3" type="MSD"/>
<xsd:element name="year1" type="xsd:duration">
<xsd:simpleType>
<xsd:restriction base="xsd:duration">
<xsd:maxExclusive value="P2Y"/>
<xsd:minExclusive value="P1Y"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="year2" type="xsd:duration">
<xsd:simpleType>
<xsd:restriction base="xsd:duration">
<xsd:maxInclusive value="P2Y"/>
<xsd:minInclusive value="P1Y"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="MSD">
<xsd:restriction base="xsd:duration">
<xsd:minOccurs value="0"/>
<xsd:maxExclusive value="PT24H"/>
<xsd:minExclusive value="-PT24H"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>