[ 
https://issues.apache.org/jira/browse/DAFFODIL-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Lawrence updated DAFFODIL-2092:
-------------------------------------
    Fix Version/s: 2.4.0

> Bad diagnostic when using dynamic separator the value of which is NUL (ascii 
> 0)
> -------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2092
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2092
>             Project: Daffodil
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>            Reporter: Michael Beckerle
>            Assignee: Dave Thompson
>            Priority: Major
>             Fix For: 2.4.0
>
>         Attachments: my.dfdl.xsd, my2.csv
>
>
> This test actually shows up two bugs.
> One bug, which appears in both 2.2.0 and 2.3.0 is that if you have
> {code:java}
> dfdl:separator="{ ./sep }"{code}
> and the value of the sep element is a string containing a single NUL 
> character, then on 2.2.0 it complains the separator cannot be an empty 
> string. Clearly this string is not empty.
> On 2.3.0, the diagnostic message also complains about what is in the string 
> somewhat differently however. The message is:
> {code:java}
> [error] Schema Definition Error: The property 'null' cannot start or end with 
> the string " ", did you mean to use '%SP;' instead?
> Schema context: sequence[2] Location line 80 column 10 in 
> file:/home/mbeckerle-unencrypted/DFDLSchemas/CSV/src/test/resources/com/tresys/my.dfdl.xsd{code}
> Note that there are two problems here. First is "The property 'null' cannot 
> ...." that's broken because the property name isn't being provided. Instead 
> it somehow has 'null' as the property name.
> Second it somehow thinks there is whitespace/space in the delimiter.
> The DFDL schema and test data file are attached to this bug.  If placed in 
> the same directory, the test can be run from the CLI using:
> {code:java}
> daffodil -v parse  -s my.dfdl.xsd  my2.csv{code}
> The data consists of a header row, then a set of data row lines. Each data 
> row begins with a single character, which goes into the Sep element, and that 
> element's value is to be used as the separator for the remaining elements of 
> the row.
> When this value of Sep is an ordinary character such as "," or "|", things 
> work fine.
> When this value of Sep is an Ascii NUL, these errors occur.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to