![]() |
|||
|
|||
Usage |
The __mode attribute can be added to any element to modify its behaviour during processing. The presence of the attribute will determine whether an element and its sub-elements is processed, whether it is echoed with other output after having been processed, and whether the element itself will be included in that output. |
||
The default value for the __mode attribute is "default". In this case, the element will be processed, and the tags will be displayed with the process output. |
|||
When __mode is set to "hide", the element will be processed, but its output will not be displayed. The element tags themselves will also not be displayed. |
|||
When __mode is set to "dissolve", the element will be processed and displayed, but the element's tags will not be included in the display. When the element dissolves, the content effectively moves one level up the element tree. |
|||
When __mode is set to "ignore", the element is not processed and neither element nor content are displayed. |
|||
The __mode attribute is often used when dummy tags are needed to provide temporary encapsulation for a piece of code. For instance, you may want a set of templates each to include a set of variable assignments stored in a common header file. The header file would be included in the template using an _eval command. The _eval command is required, because the assignments in the header file have to be processed for them to have effect. However, the _eval command will only import elements, and will ignore "free text" in the header file. For this reason, the contents of the header file - the variable assignments - must be encapsulated inside a pair of temporary element tags. These temporary tags will, by default, be included with the code being imported from the header file. But, if the __mode attribute for the temporary element is set to "dissolve", the contents of the element will be included but the outer tags will not appear. |
|||
Examples | |||
Version |
1.0 |
||
Ref |
t.3 |
||
Date |
12 May 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 |