Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1310

Incorrect infoset events created with arrays of complex elements

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 1.1.0
    • None
    • Unparsing
    • None

      Say we have a schema with something like this:

      <element name="e">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="s" maxoccurs="unbounded">
              <xs:complexType>
                <xs:choice>
                  <xs:element name="c1" />
                  <xs:element name="c2" />
                </xs:choice>
              </xs:complexType>
            </xs:element>
          <xs:sequence>
        </xs:complexType>
      </element>

      And the following infoset:

      <e>
        <s><c1 /></s>
        <s><c2 /></s>
      </e>

      In this case, the sequence of events that are created are:

      • Start(DIComplex(e))
      • Start(DIArray(s))
      • Start(DIComplex(s))
      • End(DIArray(s))

      Instead of getting End(DIArray(s)), it should instead be getting a Start(DISimple(c1)). Looks like something is wrong with how the array stack is used and it is incorrectly End'ing complex arrays.

      Also of note, if I look at the events after the End(DIArray(s)), I see the Start/End events for DISimple(c2).

              efinnegan Elizabeth Finnegan
              slawrence Steve Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: