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

"Unparser not yet Implemented" Error with certain configuration of nillable elements

XMLWordPrintableJSON

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

      When writing variations of a schema with a sequence of two nillable elements, I came across a certain scenario that seems to consistently result in the following error:

      Runtime Schema Definition Error: Unparser is not yet implemented.
      [error] Schema context: element.doc7. Location line 140 column 6 in file:/tmp/text_nil_only45662042067256730168.dfdl.xsd. Data Context: byte 0.
      [error]     at edu.illinois.ncsa.daffodil.processors.ParseOrUnparseState.SDE(PState.scala:153)
      [error]     at edu.illinois.ncsa.daffodil.processors.unparsers.DummyUnparser.unparse(Unparser.scala:113)
      [error]     at edu.illinois.ncsa.daffodil.processors.unparsers.Unparser.unparse1(Unparser.scala:57)
      [error]     at edu.illinois.ncsa.daffodil.processors.unparsers.SeqCompUnparser$$anonfun$unparse$2.apply(Unparser.scala:100)
      .....

      This only occurs when one of the nillable elements in the sequence has the nilValue set by referencing a defined format, and the second one is set with a different method. If both of the elements have the nilVaue set via a referenced format, the test works without issues.

      I have tests with the following scenarios (red indicates failure):

        nil1:default format nil1:format ref nil1:explicitly on element
      nil2:default format text_nil_only4 text_nil_only6 text_nil_only17
      nil2:format ref text_nil_only8 text_nil_only5 text_nil_only15
      nil2:explicitly on element text_nil_only16 text_nil_only10 text_nil_only9

      Note that the only failing scenarios are the cases where one nilValue is set via a referenced element and the second is set a different way, regardless of ordering.

      See the tests in red above in the following files:
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section13/nillable/literal-value-nils-unparse.tdmldaffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section13/nillable/TestNillableUnparseDebug.scala
      daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section13/nillable/TestNillableUnparse.scala

              dthompson David Thompson
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: