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

XML Schema: wrong error for facet <xs:length> with <xs:minLength>

    XMLWordPrintable

Details

    • b23

    Description

      Java: JRE: XML Schema: wrong error for facet <xs:length>

      The JRE has an implementation of XML Schema.

      One feature of XML Schema is facets, which are conditions
      on a simple type. The facets include <xs:length> and <xs:minLength>.

      One simple type can be derived from another, by restriction.
      The rules about using <xs:length> in conjunction with <xs:minLength>
      are here:

      http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#length-coss

        4.3.1.4 Constraints on length Schema Components

        Schema Component Constraint: length and minLength or maxLength

        If length is a member of {facets} then

        1 It is an error for minLength to be a member of {facets} unless

        1.1 the {value} of minLength <= the {value} of length and

        1.2 there is type definition from which this one is derived
        by one or more restriction steps in which minLength has
        the same {value} and length is not specified.

      The problem is, the JRE does not appear to honour those rules.
      It is forbidding a combination that I think is legal;
      and, the error message that it issues does not relate correctly
      to the XML Schema that was provided.

      Please fix the JRE so that it honours the rules correctly;
      and also correct the broken error message.

      Attachments

        Issue Links

          Activity

            People

              aefimov Aleksej Efimov
              shadowbug Shadow Bug
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: