XML Script logo
Template Specifiers (advanced)
Usage

When working within a template, we sometimes wish to access entities in other templates. Using normal syntax, this is not possible since $\ refers to the current template. In order to get round this problem, you can use a template specifier. This allows to to specify which template to start from when accessing template side elements.

The syntax for a template specifier is '|temp_spec|element'. 'temp_spec' is the path to a template: $\ is the original XST, and \ is the data root (yes, you can sometimes get templates in the data tree!). If you don't give a \, the path will be relative to the current template or data element, but this is probably not very useful. The "." syntax is also supported for specifying the current element. 'element' is a normal path to an element. Note that specifying $ or \ at the start of the 'element' is unneccesary and will cause an error.

Note that there is no equivalent construct for specifying where to look for things on the data side, since / always refers to the data root.

Examples

Using template specifiers

Using template specifiers with nested templates

Version

1.1

Ref

t.56

Date

September 1999

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited