Skip to main content

Literal Values

Literal Values

When you assign a value to a property, you often specify a literal value. Literal values are also sometimes suitable in other places, such as the value in a trace action.

A literal value is either of the following:

XML Reserved Characters

Because BPL processes are saved as XML documents, you must use XML entities in the place of XML reserved characters:

To include this character... Use this XML entity...
> >
< &lt;
& &amp;
' &apos;
" &quot;

For example, to assign the value Joe’s "Good Time" Bar & Grill to a property, set Value equal to the following:

"Joe&apos;s &quot;Good Time&quot; Bar &amp; Grill"

This restriction does not apply inside <code> and <sql> activities, because InterSystems IRIS® automatically wraps a CData block around the text that you enter into the editor. (In the XML standard, a CData block encloses text that should not be parsed as XML. Thus you can include reserved characters in that block.)

Separator Characters in Virtual Documents

In most of the virtual document formats, specific characters are used as separators between segments, between fields, between subfields, and so on. If you need to include any of these characters as literal text when you are setting a value in the message, you must instead use the applicable escape sequence, if any, for that document format.

For information on these separators, see:

When XML Reserved Characters Are Also Separators

  • If the character (for example, &) is a separator and you want to include it as a literal character, use the escape sequence that applies to the virtual document format.

  • In all other cases, use the XML entity as shown previously in XML Reserved Characters.

Numeric Character Codes

You can include decimal or hexadecimal representations of characters within literal strings.

The string &#n; represents a Unicode character when n is a decimal Unicode character number. One example is &#233; for the Latin e character with acute accent mark (é).

Alternatively, the string &#xh; represents a Unicode character when h is a hexadecimal Unicode character number. One example is &#x00BF; for the inverted question mark (¿).

FeedbackOpens in a new tab