Adding DFDL escape schemes

An escape scheme tells DFDL to treat characters literally, rather than as a separator or terminator. For example, you might need to escape commas in a CSV file.

Before you begin

Create or open a DFDL schema file. See DFDL schema editor for a description of the DFDL schema editor.

About this task

Add an escape scheme, and then refer to it using the "Escape Scheme Reference" property on the relevant elements.

Procedure

  1. In the Outline view, expand DFDL > Escape Schemes.
  2. In the DFDL schema editor, click the icon to add an escape scheme to the schema, and type a name when prompted.
  3. Configure the scheme in the Representation Properties :
    1. Escape Kind :
      Possible values:
      • escapeCharacter: A single escape character that causes only the next character to be interpreted literally. The escape character itself is escaped by the Escape Escape character.
      • escapeBlock: A pair of escape strings that causes the enclosed group of characters to be interpreted literally. The ending escape string is escaped by the Escape Escape character.
    2. Escape Character: if the escape kind is escapeCharacter, type a single character that escapes the following character.
    3. Escape Block Start: type the string of characters that mark the beginning of the escape block.
    4. Escape Block End: type the string of characters that mark the end of the escape block.
    5. Escape Escape: specify the character that escapes the escape character or string.
    6. Extra Escaped Character: optionally, specify any other characters that must be escaped when serializing.
    7. Generate Escape Block: if the escape kind is escapeBlock, define when escaping is used during serialization.