This is the expected behavior. Table 27, which talks about the escape
properties, has this to say in the escapeKind section:

> Occurrences of the dfdl:escapeCharacter and 
> dfdl:escapeEscapeCharacter are removed from the data, unless the 
> dfdl:escapeCharacter is preceded by the dfdl:escapeEscapeCharacter, 
> or the dfdl:escapeEscapeCharacter does not precede the
> dfdl:escapeCharacter.

So whether the escapeCharacter actually escapes a delimiter or not, the
escape character is still removed.


On 4/30/20 9:42 AM, Costello, Roger L. wrote:
> The input has these three data items:
> 
>       a
>       red and/or blue,green
>       c
> 
> The data items are separated by a comma. The forward slash is the 
> escapeCharacter as well as the escapeEscapeCharacter.
> 
> With this input:
> 
> a,red and//or blue/,green,c
> 
> I get this (correct) XML:
> 
> <SimpleDataFormat>
>   <DataItem1>a</DataItem1>
>   <DataItem2>red and/or blue,green</DataItem2>
>   <DataItem3>c</DataItem3>
> </SimpleDataFormat>
> 
> If I forget to escape the escape character:
> 
> a,red and/or blue/,green,c
> 
> Then Daffodil does not raise an error and it generates this erroneous XML:
> 
> <SimpleDataFormat>
>   <DataItem1>a</DataItem1>
>   <DataItem2>red andor blue,green</DataItem2>
>   <DataItem3>c</DataItem3>
> </SimpleDataFormat>
> 
> A bug in Daffodil? I am using version 2.5
> 
> /Roger
> 

Reply via email to