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

Schema with facet=maxInclusive accepted for derived time type greater than the one in the base

XMLWordPrintable

    • 1.4
    • generic
    • generic
    • Verified

        The test case
        xml_schema/msData/datatypes/Facets/Schemas/jaxp/time_maxInclusive007_119.html#time_maxInclusive007_119
        failed during JCK-runtime 7 testing for JDK 7 b126 with the message: "STATUS:Failed.The negative testcase unexpectedly passed."

        The validator uses the following schema:

        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
        <xs:simpleType name="base">
        <xs:restriction base="xs:time">
        <xs:maxInclusive value="12:00:00-10:00"/>
        </xs:restriction>
        </xs:simpleType>
        <xs:simpleType name="derived">
        <xs:restriction base="base">
        <xs:maxInclusive value="12:00:00-14:00"/>
        </xs:restriction>
        </xs:simpleType>
        </xs:schema>

        As you can see the derived time type is grater than the one in the base and maxInclusive facet was used. But in spit of it the schema was accepted.
        See http://www.w3.org/TR/xmlschema-2/#time for the time format used in the test.

        This is regression since JDK 7 b126.
        The test will pass with JDK 7 b125 with the massage like below:
        Error: file:/export/JCK/JCK-runtime-7/tests/xml_schema/msData/datatypes/Facets/Schemas/time_maxInclusive007.xsd(8,30): cvc-maxInclusive-valid: Value '12:00:00-14:00' is not facet-valid with respect to maxInclusive '22:00:00.0Z' for type 'base'.

              joehw Joe Wang
              afomin Alexander Fomin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: