Delimiters directive

 

Use the Delimiters directive to define an alternative character or characters to curly brace characters to mark the start and end of directives.

Ordinarily, curly brace characters { and } mark the start and end of every directive. These curly brace characters are also used in JavaScript, Cascading Style Sheet text, and other languages that make HTML dynamic. In certain situations, some software (other than the Pega Platform) can respond incorrectly when it encounters these characters in HTML.

You can use the Literal directive around the curly braces in source HTML. However, placing the Literal directive around each pair of braces can be tedious or error-prone. You may prefer to override the default syntax for directives.

Use the Delimiters directive to change the default syntax for all directives. You can replace the curly brace characters with other characters of your choice.

For example, use this syntax to make the system recognize the number sign (#) character as the opening character and the at-sign (@) character as the closing character for every directive.

{DELIMITERS OPEN= # CLOSE = @ }

Complete syntax

In the syntax presentations below:

You can reset either or both of the current open and close characters by specifying them as shown:

{DELIMITERS OPEN= character [character]   CLOSE = character [character] }

Leave a space before the closing curly brace. To assign only a single character, replace character with one of the following characters:

          { } [ ] + ^ ~ ? : ; # @ \

To assign two characters, replace character with any character that you can type, except for numbers and letters. This means you can use any ASCII punctuation character, such as the percent sign (%).

To restore the curly braces as the directive delimiter later within your source HTML, use the Delimiters directive again with no options specified.

To disable directives for the remainder of the stream definition, use this syntax:

 {DELIMITERS NONE }

Caution: Do not make the current values of the OPEN and CLOSE characters identical. This is allowed, but then you cannot nest one directive within the scope of another directive.

Tips

If you use Microsoft Visual Studio (and J++) as an HTML editor, set <% as an opening delimiter and %> as a closing delimiter. Visual J++ highlights these delimiters in yellow so you can see your directives easily.

Directives