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

Xerces handles the "Unique Particle Attribution Constraint" ambiguously

XMLWordPrintable

    • 1.4
    • generic
    • generic
    • Verified

        There is a group of equivalent schematas as follows, where N is non-negative int:
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
          <xs:complexType name="correct.sequence.2">
                                <xs:sequence>
                                            <xs:element name="a" minOccurs="0" />
                                            <xs:element name="b" minOccurs="N" maxOccurs="N" />
                                            <xs:element name="b"/>
                                </xs:sequence>
                    </xs:complexType>
        </xs:schema>

        If N is equal to 1 then schema is valid.
        For N from 2 to .... the schema is invalid and Xerces reports:

        (2,45): cos-nonambig: b and b (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.

              joehw Joe Wang
              lkuskov Leonid Kuskov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: