ISML expressions can use both numerical and string constants.
Numerical constants are simply numbers, such as 12 or 3.6. In the example:
#len(sub:DisplayName) > 15#
the number 15 is a numerical constant.
A string constant must be enclosed by either single quotes (') or double quotes ("). Intershop recommends to use single quotes, because double quotes cause problems with some HTML editors.
If a string constant includes single or double quotes as valid characters, these need to be encoded by doubling them, as demonstrated in the examples below:
To use a single quote inside a string that is bordered by single quotes, use two single quotes:
'this is a string '' with a single quote in the middle'
To use a double quote inside a double-quoted string, use two double quotes.
"this is a string "" with a double quote in the middle"
To use a single quote inside a string that is bordered by single quotes, put a backslash before the single quote character.
'Single Quote: \''
To use a double quote inside a string that is bordered by double quotes, put a backslash before the double quote character.
"Double Quote: \""
This encoding may only be used in cases where both Java-like and SQL-like encoding schemes are causing problems with a template editor. The encoding is similar to standard Java encoding (with backslash) and uses the character 's' for single quotes and 'd' for double quotes. The standard Java codes \b \t \n \f \r \\ and \u are supported too. See your Java documentation for more information.