Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6311540

xs:dateTime, timezone - Minute magnitude must be 0 if hour is 14

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0
    • xml

      XML Schema Part 2: Datatypes Second Edition (http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#dateTime) in 3.2.7.3 "Timezones" states that if the hour magnitude of timezone is 14, the minute value must be 0.

      javax.xml.validation.Validator.validate() does not throw SAXException when validates xml with invalid dateTime (timezone can not be +14:01) :

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <root>
        <fld>2002-12-31T23:00:00+14:01</fld>
      </root>

      xml schema:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:element name="root" type="root"/>
        <xs:complexType name="root">
          <xs:sequence>
            <xs:element name="fld" type="xs:dateTime" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:schema>

            sreddysunw Sunitha Reddy (Inactive)
            dlepekhi Dmitry Lepekhin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: