This section describes a tutorial example on validation errors against dateTime restriction facets.
In the previous section, we created a schema using "dateTime", "date", and "time" datatypes with different restriction facets.
Now we are going to create an XML document, datetime_datatype_error.xml, with several validation errors:
>java XsdSchemaValidator datetime_datatype.xsd
datetime_datatype_error.xml
Error:
Line number: 6
Column number: 3
Message: cvc-datatype-valid.1.2.1: '2007/02/02T23:59:59' is not
a valid value for 'dateTime'.
Error:
Line number: 6
Column number: 3
Message: cvc-attribute.3: The value '2007/02/02T23:59:59' of
attribute 'ticketDateTime' on element 'ticket' is not valid with
respect to its type, 'null'.
Error:
Line number: 6
Column number: 3
Message: cvc-maxInclusive-valid: Value '2017-03-01' is not
facet-valid with respect to maxInclusive '2009-12-31' for type
'#AnonType_departureDateticket'.
Error:
Line number: 6
Column number: 3
Message: cvc-attribute.3: The value '2017-03-01' of attribute
'departureDate' on element 'ticket' is not valid with respect
to its type, 'null'.
Error:
Line number: 6
Column number: 3
Message: cvc-minInclusive-valid: Value '03:30:00' is not
facet-valid with respect to minInclusive '05:00:00.0' for type
'#AnonType_departureTimeticket'.
Error:
Line number: 6
Column number: 3
Message: cvc-attribute.3: The value '03:30:00' of attribute
'departureTime' on element 'ticket' is not valid with respect
to its type, 'null'.
Failed with errors: 6