This has come up a few times. But I can easily find only one example in DFDL workgroup email threads, which is vCard 3.0 format:
It's from a standard called vCard 3.0 (RFC 2426 - http://tools.ietf.org/html/rfc2426). A backslash is used to a) escape itself; b) escape in-scope delimiters; c) indicate an embedded linefeed. The backslash would need removing for a) and b) but not for c). So in this format you need extraEscapedCharacters for the embedded linefeeds. In this case, the linefeed is NOT a delimiter, so technically doesn't need escaping as far as DFDL is concerned, but it is a requirement of the format. ________________________________ From: Costello, Roger L. <[email protected]> Sent: Friday, January 11, 2019 2:07 PM To: [email protected] Subject: Good use case for extraEscapedCharacters? Hello DFDL community, My input uses a colon to separate a label on the left side from a message on the right side: Dear Sir: Thank you for your response. By using dfdl:escapeScheme I can allow additional colons in the input, provided they are escaped (I’ll use backslash as the escape character), e.g., Dear \:Sir: Thank you \:for your \\response. Here’s how I established that escaping capability: <dfdl:escapeScheme escapeKind="escapeCharacter" escapeCharacter="\" escapeEscapeCharacter="\" extraEscapedCharacters="" generateEscapeBlock="whenNeeded" /> I don’t think that I fully understand the property “extraEscapedCharacters”. The specification says this: * A whitespace separated list of single characters that must be escaped in addition to the in-scope delimiters. If there are no extra characters to escape the property should be set to "". * This property only applies on unparsing. Through experimentation I have found that if I set: extraEscapedCharacters="D" with this as the input: Dear Sir: Thank you for your response. then parsing followed by unparsing yields this: \Dear Sir: Thank you for your response. I don’t see any value in that (why would I want D to have a backslash preceding it?). What is a good use case for extraEscapedCharacters? /Roger
