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

Unparse: Sequences need way to skip over optional branches

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3.0
    • Unparsing
    • None

    Description

      For example, if we have something like this:

      <sequence>
        <element name="optional1" minOccurs="0" maxOccurs="1" />
        <element name="optional2" minOccurs="0" maxOccurs="1" />
      </sequence>
      

      The unparser generates looks something like this (not that optional elements are treated as arrays):

      <Sequence>
         <Array>...</Array>
         <Array>...</Array>
      </Sequence>
      

      When the SequenceCombinatorUnparser gets an event it could the Start(DIArray) of either of the elements, since the first one is optional. I think we need something similar to the ChoiceMap where based on the next element received, it can skip over some of the parsers. This avoids having to do any backtracking kindof work.

      Attachments

        Activity

          People

            dfthompson Dave Thompson
            slawrence Steve Lawrence
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: