Syntax | Description | Example |
---|---|---|
<attribute> | Replaced with value of attribute |
$user$
| |
<attribute.property> | Replaced with value of property of attribute (or empty string if missing). |
$user.name$
<attribute.(expr)> | Indirect property lookup. Same as attribute.property except value of expr is the property name |
. |
| |
<multi-valued-attribute> | Concatenation of |
$users$
| |
<multi-valued-attribute; separator=expr> | Concatenation of |
$users; separator=", "$
| |
<template(argument-list)> | Include (i.e. call) template. argument-list is a list of attribute assignments of the form arg-of-template=expr. expr is evaluated in the context of the surrounding template not of the invoked template. |
$bold()$
| |
<attribute:template(argument-list)> | Template application. The optional argument-list is evaluated before application. The default attribute it is set to the value of attribute. If attribute is multi-valued, it is set to each element in turn and template is invoked |
$name:bold()$
| |
<attribute:{argument-name_ | _anonymous-template}> | Apply an anonymous template to each element of attribute. Set the argument-name to the iterated value and also set |
$users:{s|<li>$s$</li>}; separator="\n"$
| |
<if(!attribute)>subtemplate<endif> | If attribute has no value or is a |
$if(users)$ $users:{u|$u$}$ $endif$
| ||
| escaped delimiter prevents |
|
\
| |
| special characters: space, newline, tab, carriage return. |
$\n$
| |
| Comments, ignored by StringTemplate. |
$! this is a comment !$
|