Variable processing in nested requests

$ *var*$ references may occur anywhere within the curly braces of a nested Image Serving or Image Rendering request, including to the left of the ‘?’ separating the path from the query. The server substitutes these references with values (either from the url or from catalog::Modifier of the main image catalog) before further parsing and processing of the nested request.

In addition, all $ *var*= definitions from the url or catalog::Modifier are forwarded to all nested Image Serving and Image Rendering requests. This ensures that all variable definitions are available to all templates, regardless of nesting level.

Regardless of the nesting level, only single-pass HTTP-encoding must be applied to variable values which are to be substituted anywhere in nested Image Rendering or Image Serving requests or their associated catalog::Modifier strings.

Variable processing in embedded foreign requests

$ *var*$ references occurring anywhere within the curly braces of an embedded foreign request are substituted with matching variable definition values. This allows embedded foreign requests to be placed in a template in an image catalog.

Variable values which are to be substituted into foreign requests typically must be double-encoded, since no re-encoding is applied before the server attempts to transmit the final foreign url.

Variable processing in SVG files

$ *var*$ references may occur in SVG files in attribute values and in <text> strings. Image Serving substitutes these with the matching $ *var*= definitions known at the request nesting level at which the SVG file is specified.

NOTE
Any variable value which is to be substituted into an href attribute value must be double URL-encoded; all others must be singly encoded.

Pre-defined path variable

The object specified in the request path is assigned to the pre-defined variable *$object*. ’ $ *object*$’ may be placed anywhere in the request, in the template referenced by the request, or in a nested/embedded request where such object is permitted, including the value of src= and mask=, and the path of a nested/embedded request.

For example, the following request reuses the image specified in the path as the source of a layer in a nested request:

/is/image/a/b?…&layer=3&src=is{…&src=$object$}&…

This is equivalent to

/is/image/a/b?…&layer=3&src=is{…&src=a/b}&…

The definition of *$object* can be overridden by explicitly specifying $ *object*= with the desired value.

The predefined path variable is commonly used in conjunction with template=.

Default

None. Only variables which have been defined are substituted by the server (except the pre-defined path variable $object, which is always substituted). Any occurrences of $ *var*$ remain literal if *var*cannot be matched with an existing variable definition.