Document Properties
Last Modified04-Feb-2020
Added to KB20-Jun-2013
Public AccessEveryone
Doc TypeReferences
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

Reference - ISML Constants

1 Introduction

Constants are used within ISML Expressions. There are two different types of constants:

  • Numerical Constants
  • String Constants

ISML expressions can use both numerical and string constants.

2 Numerical 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.

3 String Constants

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:

3.1 SQL-like Encoding (recommended)

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"

3.2 Java-like Encoding

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: \""

3.3 Special Intershop 7 Encoding

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.

Reference - ISML Reference


The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets