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

Leftover Data Check not Working as Expected with No Trailing Newline

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: deferred
    • Component/s: CLI, Usability
    • Labels:
      None

      Description

      Leftover Data Check not behaving as expected:

      sequence of two elements, separated by a pipe "|"
      the first is a delimited-length string, and the second is an explicit length integer, length size 3 bytes.

      [dfdl] (0.14.0)$ echo -n "string|1234" | ./daffodil-cli/target/start parse -s ./daffodil-cli/src/test/resources/edu/illinois/ncsa/daffodil/CLI/cli_schema.dfdl.xsd -r leftover
      <ex:leftover xmlns:ex="http://example.com">
      <ex:e3>string</ex:e3>
      <ex:e4>123</ex:e4>
      </ex:leftover>

      The parse seems to ignore the extra digit, and only parses 3 bytes.

      However, if I change the input to "string|123", the parse complains about leftover data:

      [dfdl] (0.14.0)$ echo -n "string|123" | ./daffodil-cli/target/start parse -s ./daffodil-cli/src/test/resources/edu/illinois/ncsa/daffodil/CLI/cli_schema.dfdl.xsd -r leftover
      [error] Left over data. 10 bytes available. Location: byte 10
      UTF-8 text starting at byte 8 is: (23)
      Data (hex) starting at byte 8 is: (0x3233)
      <ex:leftover xmlns:ex="http://example.com">
      <ex:e3>string</ex:e3>
      <ex:e4>123</ex:e4>
      </ex:leftover>

      I'm in the process of writing up some TDML tests as well for this.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                Created:
                Updated:

                  Tasks

                  Progress: 
                   0/0