[DFDL-WG] Escaping %NL; and separators with same suffix
Steve Lawrence
slawrence at tresys.com
Wed Feb 4 11:35:09 EST 2015
Assume we have a schema with separator=", %NL;" and escapeCharacter="\"
and the following data:
abc,de\CRLFfg,hij
Where CRLF is the windows-style line ending.
How does the escape character escape the CRLF?
One interpretation is that the the escape character only escapes the
following character, which means CRLF will not match %NL;, but the LF
does. So you might end up with a infoset like this:
<seq>
<e>abc</e>
<e>deCR</e>
<e>fg</e>
<e>hij</e>
</seq>
Alternatively, one might think the escape character should escape the
entire CRLF, so the resulting infoset might look like this:
<seq>
<e>abc</e>
<e>deCRLFfg</e>
<e>hij</e>
</seq>
More generally, what happens when one separator is a suffix of another.
For example:
separator="XXYY YY" escapeCharacter="\"
data: abc,de\XXYYfg,hij
Does the escape character escape the entire XXYY, and YY is not
considered as a delimiter? Does this change at all if a separator is
also a prefix of another, e.g. separator="XXYY XX YY", which is very
similar to %NL;?
- Steve
More information about the dfdl-wg
mailing list