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

SDE should occur when empty sequence is the content of a complexType

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: never
    • Component/s: Front End
    • Labels:
      None

      Description

      According to the spec:
      XML schema does not define an empty sequence that is the content of a complex type as effective content so any DFDL annotations on such a construct would be ignored. It is a schema definition error if the empty sequence is the content of a complex type.

      I set this up in test emptySequenceSDE, but there is no error:

      [info] - test_emptySequenceSDE *** FAILED ***
      [info] java.lang.Exception: Expected error. Didn't get one. Actual result was <emptySeq></emptySeq>
      [info] at edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runParseExpectErrors(TDMLRunner.scala:479)
      [info] at edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:402)
      [info] at edu.illinois.ncsa.daffodil.tdml.TestCase.run(TDMLRunner.scala:350)
      [info] at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTestWithDataVolumes(TDMLRunner.scala:222)
      [info] at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:213)
      [info] at edu.illinois.ncsa.daffodil.section14.sequence_groups.TestSequenceGroups.test_emptySequenceSDE(TestSequenceGroups.scala:77)
      [info] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [info] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [info] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [info] at java.lang.reflect.Method.invoke(Method.java:601)

      The test is emptySequenceSDE in the following files:
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section14/sequence_groups/SequenceGroup.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section14/sequence_groups/TestSequenceGroupsDebug.scala
      daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section14/sequence_groups/TestSequenceGroups.scala

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Tasks