Description
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.