Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1240

A choice between an empty sequence and 1 or more non-empty particles should allow an empty sequence.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.9.0
    • 2.9.1
    • None

    Description

      Xerces currently handles one special case correctly; a choice between an empty sequence and one non-empty particle:

      <xs:choice>
      <xs:sequence/>
      <xs:element name="a"/>
      </xs:choice>

      but fails to produce the correct content model representation when more than one non-empty particle is specified:

      <xs:choice>
      <xs:sequence/>
      <xs:element name="a"/>
      <xs:element name="b"/>
      ...
      </xs:choice>

      If one (or more) of the choices is an empty sequence the CMBuilder needs to wrap the choice node (i.e. XSCMBinOp) in a zero-or-one (optional) node so that the content model produced will allow the empty sequence.

      Attachments

        Activity

          People

            mrglavas@ca.ibm.com Michael Glavassevich
            mrglavas@ca.ibm.com Michael Glavassevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: