a bit of work on import. Charles Bozeman provided a compare function for
* xmlschemas.c: a bit of work on import.
* xmlschemastypes.c: Charles Bozeman provided a compare function
for date/time types so min/max facet restrictions should work,
indeterminate comparisons return an error instead of equal.
* test/schemas/date_0* result/schemas/date_0_0: specific test
from Charles Bozeman too
Daniel
diff --git a/test/schemas/date_0.xsd b/test/schemas/date_0.xsd
new file mode 100644
index 0000000..aa919b0
--- /dev/null
+++ b/test/schemas/date_0.xsd
@@ -0,0 +1,121 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ Testing date/time data types
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="date">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
+ <xsd:element name="time" type="xsd:time"/>
+ <xsd:element name="time1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:time">
+ <xsd:maxInclusive value="23:59:59.9999999"/>
+ <xsd:minInclusive value="00:00:00"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="time2">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:time">
+ <xsd:maxInclusive value="13:50:50"/>
+ <xsd:minInclusive value="12:00:00"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="date1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:date">
+ <xsd:maxExclusive value="2002-05-19"/>
+ <xsd:minExclusive value="1996-05-19"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="date2">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:date">
+ <xsd:maxInclusive value="2002-05-19Z"/>
+ <xsd:minInclusive value="1996-05-19Z"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="dt1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:dateTime">
+ <xsd:maxExclusive value="2002-01-01T00:00:00Z"/>
+ <xsd:minExclusive value="1970-01-01T00:00:00Z"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="dt2">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:dateTime">
+ <xsd:maxInclusive value="2003-05-01T00:00:00Z"/>
+ <xsd:minInclusive value="1996-05-19T21:30:00Z"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="hol" type="holidays"/>
+ <xsd:element name="year1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:gYear">
+ <xsd:maxInclusive value="2003Z"/>
+ <xsd:minInclusive value="1996Z"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="yearmon1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:gYearMonth">
+ <xsd:maxInclusive value="2003-05Z"/>
+ <xsd:minInclusive value="1996-05Z"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="mon1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:gMonth">
+ <xsd:maxInclusive value="--01--Z"/>
+ <xsd:minInclusive value="--05--Z"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="day1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:gDay">
+ <xsd:maxInclusive value="---28"/>
+ <xsd:minInclusive value="---31"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name='holidays'>
+ <xsd:annotation>
+ <xsd:documentation>some US holidays</xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base='xsd:gMonthDay'>
+ <xsd:enumeration value='--01-01'>
+ <xsd:annotation>
+ <xsd:documentation>New Year's day</xsd:documentation>
+ </xsd:annotation>
+ </xsd:enumeration>
+ <xsd:enumeration value='--07-04'>
+ <xsd:annotation>
+ <xsd:documentation>4th of July</xsd:documentation>
+ </xsd:annotation>
+ </xsd:enumeration>
+ <xsd:enumeration value='--12-25'>
+ <xsd:annotation>
+ <xsd:documentation>Christmas</xsd:documentation>
+ </xsd:annotation>
+ </xsd:enumeration>
+ </xsd:restriction>
+ </xsd:simpleType>
+</xsd:schema>
+