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

XSD Validation errors messages are incorrect and not clear

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 1.4.0
    • 1.3.1
    • xml

      the following TCK tests invalid Schemas and have incorrect mesemail for JCK team, Alexey Shurygin <###@###.###> regarding bug 6274351:

      axp-tck-13/tests/api/xml_schema/msxsdtest/Group/groupH021.html#groupH021_i

      Validator error message:
      [Error] groupH021.xsd:22:20: rcase-MapAndSum.2: Group's occurrence
      range, (2,unbounded), is not a valid restriction of base group's
      occurrence range, (1,1).
      [Error] groupH021.xsd:22:20: derivation-ok-restriction.5.4.2: Error
      for type '#AnonType_elem'. The particle of the type is not a valid
      restriction of the particle of the base.

      It is not yet clear for me why this error is throwed?
      Why validator references to the rule "Schema Component Constraint:
      Particle Derivation OK (Sequence:Choice -- MapAndSum)"
      (http://www.w3.org/TR/xmlschema-1/#rcase-MapAndSum) while this rule
      is saying about a sequence group particle being a valid restriction
      of a choice group particle but we have 2 choice group particles in
      restricting one another in file groupH021.xsd?
      Currently it seems to me like a bug in validator.
      Probably the following code:
      <xsd:restriction base="A">
      <xsd:choice>
      <xsd:group ref="x" maxOccurs="unbounded"/>
      </xsd:choice>
      </xsd:restriction>
      is treated as a sequence due to Schema Component Constraint: Particle
      Valid (Restriction)
      (http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict)?
      Please clarify this.

      10.jaxp-tck-13/tests/api/xml_schema/msxsdtest/complexType/ctF007.html
      Validator error message:
      [Error] ctF007.xsd:10:33: rcase-MapAndSum.2: Group's occurrence
      range, (0,0), is not a valid restriction of base group's occurrence
      range, (1,1).
      [Error] ctF007.xsd:10:33: derivation-ok-restriction.5.4.2: Error for
      type 'fooType'. The particle of the type is not a valid restriction
      of the particle of the base.

      Like in item 9: why the code in ctF007.xsd violates Schema Component
      Constraint: Particle Derivation OK (Sequence:Choice -- MapAndSum)
      (http://www.w3.org/TR/xmlschema-1/#rcase-MapAndSum)?
      ###@###.### 2005-06-07 00:24:40 GMT

            nwalshsunw Norman Walsh (Inactive)
            jsuttorsunw Jeff Suttor (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: