![]() |
![]() ![]() ![]() |
||
|
|||
Description |
In XML Script, there are two internal "tree" or "branch" structures, the template tree and the data tree: |
||
When the processor reads the script, it puts the contents in the template tree for processing. Anything in the template tree is automatically processed when it is encountered, so the template tree normally contains code. Unrecognised elements are echoed to the output, so for example HTML code in the script would be echoed to the output. |
|||
The data tree is normally used for data which you do
not want echoed to the output. In addition, certain internal data is
stored there, for example environment variables and system data.
Elements in the data tree are not automatically processed: an explicit
command must be used. Typically, data is inserted into the data tree
using the |
|||
When we are specifying an item list, we must select which tree to look at. This is done using a branch specifier. The default, if there is no branch specifier, is to look at the data tree. If you want to look at the template tree, you can use '$' as a branch specifier. This should come before anything else in the item list. |
|||
The exception to this behaviour is when you are using a template specifier - in that case you do not need to give a branch specifier as the template specifier will decide which branch to look at. (For template specifiers, see later in the documentation) |
|||
There is another branch specifier, '%', but this is only for use in sub-content stipulations - see the documentation for subcontent stipulations. |
|||
Example |
Syntax: |
||
foo |
|||
The foo element in the data tree |
|||
Example |
Syntax: $ |
||
$foo |
|||
The foo element in the template tree |
|||
Next... | |||
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 |