You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Michael Beckerle (JIRA)" <ji...@apache.org> on 2019/03/07 17:44:00 UTC

[jira] [Created] (DAFFODIL-2089) Unparser escaping doesn't escape all the delimiters

Michael Beckerle created DAFFODIL-2089:
------------------------------------------

             Summary: Unparser escaping doesn't escape all the delimiters
                 Key: DAFFODIL-2089
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2089
             Project: Daffodil
          Issue Type: Bug
          Components: Unparsing
    Affects Versions: 2.3.0
            Reporter: Michael Beckerle


When unparsing, suppose you have a sequence with an escape scheme defined, and multiple separators:

<xs:sequence dfdl:separator="| ; ,">

Suppose dfdl:generateEscapeBlock='whenNeeded'

When unparsing, the sequence's children will be output using "|" separators.

Any "|" found in the data will cause escaping (either with the escape character or by surrounding the element value with escape block.)

The bug is this. If the data contains any of the OTHER separators, no escaping is done.

That means the output data might contain unescaped separators.

This will cause a subsequent re-parse of this data to interpret those unescaped separators as actual separators, which is broken.

The escaping of the data on unparsing needs to escape not only the canonical first separator, but all separators.

 

 

 



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