Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1910

Cannot unparse when array with minOccurs="0" is last in a sequence

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: Front End
    • Labels:
      None

      Description

      We have a schema like this:

      <xs:sequence>
        <xs:sequence>
          <xs:sequence>
            <xs:element name="foo" ... />
          </xs:sequence>
          <xs:element ref="bar" minOccurs="0" maxOccurs="unbounded" dfdl:occursCountKind="implicit" /> 
        </xs:sequence>
        <xs:element name="baz" ... />
      </xs:sequence>
      

      During schema compilation, we determine which elements could potentially appear in the infoset after the "foo" element. We correctly determine that "bar" could come after "foo", but we fail to recognize that "baz" could also come after "foo", since "bar" has minOccurs="0". This means that when unparsing, if "bar" does not exist, Daffodil outputs an error saying it expected only "bar" but did not find it.

       

        Attachments

          Activity

            People

            • Assignee:
              slawrence Steve Lawrence
              Reporter:
              slawrence Steve Lawrence
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: