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

Issues with assert and discriminator using testPattern

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • s6
    • None
    • None
    • None

      The following were issues that I found when working on DFDL-338.

      1) Assert on group reference and element reference are not functional. See assertOnGroupRef and assertOnElemRef in daffodil-test\src\test\scala-debug\daffodil\section07\assertions\TestAssertions2.scala.
      2)Shouldn't these tests, discrimPatternPass2, discrimPatternFail2, discrimPatternFail3, discrimPatternFail4, discrimPatternFail5, and discrimPatternFail6, in daffodil-test\src\test\scala\daffodil\section07\discriminators\TestDiscriminators.scala generate a schema definition error? It seems they violate the statement in the DFDL specification, 'Any one annotation point can contain only a single dfd:discriminator or one or more dfdl:asserts, but not both. It is a schema definition error otherwise.'
      3) choiceBranchDiscrimFail in daffodil-test\src\test\scala-debug\daffodil\section07\discriminators\TestDiscriminatorsDebug.scala should generate a parser error. According to the spec, if the discriminator is successful then the component is known to exist and any subsequent errors will not cause backtracking at points of uncertainty.

      Please see commits 4ac15b9 and ac91002 in master

              pchu Paul Chu (Inactive)
              pchu Paul Chu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: