When a tag is parsed, its attributes are read in one of two ways—literally, or
interpretively. Similar to existing conventions in a variety of languages, defining a value in
name='value') causes the contents of the value to be
parsed literally, regardless of the characters between quotes. Using double-quotes causes its
contents to be parsed interpretively, meaning that some characters will be treated in special
Specifically, these special characters are the dollar sign (
$), the at
@), and the ampersand (
&). These characters
correspond to variable substitution, object variable value substitution, and entity
Value substitution is the process by which a variable, cookie, object, or entity’s value is substituted for its syntactically referenced name. This occurs at the name’s original location in any arbitrary string of characters.
What may be confusing to experienced programmers at first is that LXP supports the
familiar dollar sign notation to substitute a named variable (e.g.,
$myvariable) with its associated value in a mixed character string.
When using LXP, it is important to understand the contexts in which variables are substituted (and the context in which they are not). Subsequently, it is also important to understand when to use variable substitution and when not to.
The first rule is that variables will never be substituted outside of an LXP tag. Example 13-9 attempts incorrectly to place ...