Document Tree
Document Properties
Kbid
24785V
Last Modified
04-Feb-2020
Added to KB
20-Jun-2013
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.10
  • ICM 11
  • ICM 12
Reference - ISML Constants

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.

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.

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:

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"

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

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

Disclaimer
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.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.