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

Should the parser delimit an element by the next element's initiator?

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • s11
    • None
    • None
    • None

      I created a test that contains a sequence of delimited-length integer elements. Each element has an initiator but there are no terminators or separators defined. The parser is unable to detect the second element's initator in order to finish parsing the first element. Is this the expected behavior?

      The test is test_entityAndNonMix_02:

      [error] Test edu.illinois.ncsa.daffodil.section06.entities.TestEntities_01.test_entityAndNonMix_02 failed: java.lang.Exception: Parse Error: Convert to Integer (for xs:int): Unable to parse '1 SP2' (using up all characters).
      [error] Schema context: element.e1 Location line 22 column 70 in file:/tmp/daffodil_tmp_7560375840263432956.dfdl.xsd
      [error] Data location was preceding byte 7
      [error] UTF-8 text starting at byte 0 is: ( ;1 SP2)
      [error] Data (hex) starting at byte 0 is: (0x203B3120535032)
      [error] at edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRunner.scala:559)
      [error] at edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:445)
      [error] at edu.illinois.ncsa.daffodil.tdml.TestCase.run(TDMLRunner.scala:394)
      [error] at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTestWithDataVolumes(TDMLRunner.scala:257)
      [error] at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:248)
      [error] at edu.illinois.ncsa.daffodil.section06.entities.TestEntities_01.test_entityAndNonMix_02(TestEntities_01.scala:53)
      [error] ...

      The 1 should be parsed as the first element, and the 2 should be the second. The test is in the following files:
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/entities/Entities.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section06/entities/TestEntities_01.scala
      daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section06/entities/TestEntities.scala

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

                Created:
                Updated:
                Resolved: