[
https://issues.apache.org/jira/browse/DAFFODIL-1559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555109#comment-17555109
]
Steve Lawrence commented on DAFFODIL-1559:
------------------------------------------
It looks like it's described in the "escape" option in the
[jfn:son-to-xml|https://www.w3.org/TR/xpath-functions-31/#func-json-to-xml]
function. If enabled, it just uses JSON-style backslash escaping (e.g. \t or
\uDEAD). Note that this means a backslash in the data must also be escaped
(i.e. \\). And it also adds an escaped="true" attribute to elements that have
this escape. That seems like a reasonable approach--similar idea to using PUA,
but is more legible since it's all ASCII.
> Add option to disable CRLF to LF XML canonicalization
> -----------------------------------------------------
>
> Key: DAFFODIL-1559
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1559
> Project: Daffodil
> Issue Type: Bug
> Components: API
> Reporter: Steve Lawrence
> Priority: Major
> Labels: beginner
>
> See the review or more details. The short of it is that when converting parse
> results to XML, we convert CR to LF, and we convert CRLF to LF. This means
> that we lose the information that the data used to contain CRLF. This is
> similar to how we lose that information with delimiters if someone uses NL,
> but it's slightly different since it is actual data. However, it's most user
> friendly and consistent with other XML technologies to have this behavior.
> Perhaps we need an option to convert CRLF to somewhere in PUA so that this
> information can be maintained if someone needs it.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)