XML Script logo
Command _method
Attribute

evaluate, a string, defaults to 'none'

[optional] what to evaluate before calling the template: attributes.

Attribute

template, a string, defaults to 'default'

[required] the name of the template to be run when this method is invoked.

Attribute

context, a string, defaults to '*'

[optional] a context variable used to distinguish this method from others associated with the same element.

Attribute

element, a string

[required] the name of the element to be associated with this method.

Description

Associates an element with a previously defined template. The association will endure whenever the current template is being processed or until a new tag in the same template creates a new association. If a template is processed repeatedly, an established association will continue to be visible to that template. A method association established in one template will not be visible in another template. The context variable, if used, allows the processor to distinguish between multiple methods associating different templates with the same element or object. The default context, '*', is interpreted as meaning all contexts.
The 'evaluate' attribute allows you to determine what will be evaluated before the template is run: the default is "none". At present, the only other option is "attributes", which will cause any interpolations in the attributes of the element being associated to be evaluated. Note that in this case, copies of the attributes are passed to the template, so changing the attribute values in the template will not have any effect outside of the template.

Examples of use

                                
                        

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