I suspect you have the separatorSuppressionPolicy property set to
"trailingEmpty" or "trailingEmptyStrict". Those values will allow for
empty data between separators and simply skip over them. If you set the
property to "anyEmpty" then empty elements will not be allowed and
you'll get the left over data error.

This change in 2.4 was caused by fixing a bug that makes Daffodil's
behavior match the specification regarding empty elements and separators.

On 8/21/19 11:42 AM, Costello, Roger L. wrote:
> Very odd.
> 
> It doesn't work for me.
> 
> ../../bin/daffodil.bat --version
> 
> Apache Daffodil (incubating) 2.4.0
> 
> ../../bin/daffodil.bat parse -s 
> repeating-label-message-characterization-1.dfdl.xsd -r 
> repeating-label-message 
> input/repeating-label-message-characterization-1.txt
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> 
> <repeating-label-message>
> 
>    <row>
> 
>      <label>Dear Sir</label>
> 
>      <message> Thank you for your response.</message>
> 
>    </row>
> 
>    <row>
> 
>      <label>Hello, world</label>
> 
>      <message> How are you?</message>
> 
>    </row>
> 
>    <row>
> 
>      <label>Sender</label>
> 
>      <message> John Doe</message>
> 
>    </row>
> 
>    <row>
> 
>      <label>Date</label>
> 
>      <message> November 23, 2018</message>
> 
>    </row>
> 
> </repeating-label-message>
> 
> Here is input/repeating-label-message-characterization-1.txt
> 
> I’m lost. Any suggestions on how to proceed?
> 
> /Roger
> 
> -----Original Message-----
> From: Steve Lawrence <[email protected]>
> Sent: Wednesday, August 21, 2019 10:01 AM
> To: [email protected]
> Subject: [EXT] Re: The latest version of Daffodil fails to raise a "Left over 
> data" warning message on faulty input data
> 
> Looks like it works for me:
> 
> $ daffodil --version
> 
> Apache Daffodil (incubating) 2.4.0
> 
> $ daffodil parse -s test.xsd test.txt
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> 
> <ex:repeating-label-message xmlns:ex="http://example.com";>
> 
>    <row>
> 
>      <label>Dear Sir</label>
> 
>      <message> Thank you for your response.</message>
> 
>    </row>
> 
>    <row>
> 
>      <label>Hello, world</label>
> 
>      <message> How are you?</message>
> 
>    </row>
> 
> </ex:repeating-label-message>
> 
> [warning] Left over data. Consumed 528 bit(s) with at least 384 bit(s) 
> remaining.
> 
> Data (UTF-8) starting at byte 67 is: (␍␊␣␍␊Sen...) Data (Hex) starting at 
> byte 
> 67 is: (0x0d0a200d0a53656e...)
> 
> So it is parsing only half the data and then displaying the left over warning.
> 
> How are you running Daffodil?
> 
> On 8/21/19 9:49 AM, Costello, Roger L. wrote:
> 
>  > Dear Sir: Thank you for your response.
> 
>  >
> 
>  > Hello, world: How are you?
> 
>  >
> 
>  >
> 
>  >
> 
>  > Sender: John Doe
> 
>  >
> 
>  > Date: November 23, 2018
> 
>  >
> 

Reply via email to