![]() |
|||
|
|||
Usage |
The _method and _template elements are used to associate actions, or methods, with data elements which are encountered during processing. |
||
A _template is used to define a set of actions which are to be performed on an element. Once the _template element has been defined, the processor uses a _method statement to tie it to one or more data elements. When the processor encounters an element which is named in a previously-processed _method statement, it will pass that element to the appropriate _template element for processing. That element will be made available to the code in the template as a 'current level' data object. |
|||
The _method statement takes an optional attribute, 'context'. Using context allows multiple entries to be made in the method table for the same element. This allows the action or method applied to a given element to be dependent on the program state, i.e., the context attribute. |
|||
If context is not defined as an attribute of _method, it will be treated as a default value of '*'. |
|||
When an element is processed, context will be determined as being the value of $!context immediately prior to that element, or the value of the context attribute of that element, if stated explicitly. |
|||
Examples | |||
Version |
1.1 |
||
Ref |
t.38 |
||
Date |
29 January 2000 |
||
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 |