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

Unparsing choices will fail to find an identifying branch in some cases

XMLWordPrintableJSON

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

      The current code is unable to find any elements that identify the empty sequence branch in the choice. This is because the infoset might look something like this:

      <root>
        <array><ch1>1</ch1></array>
        <array><ch2>2</ch2></array>
        <array/>
        <after>
      </root>

      So, in this case, the branch of the choice is identified not by the existence of the after element, but by the end of the array element. Currently everything is identified by the start of some element. So the choiceBranchMap needs to change the keys from a qname to a qname & start/end pair. Also need to detect cases where the end of a containing complex element could signify a choice branch. This is the reason for the 'notYetImplemented' code added in the ChoiceGroup.

      See TestCouldBeNextElementDebug.scala

              jchab Jessie Chab
              slawrence Steve Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: