Testing XSLT configurations
XSLT provides the ability to use parameters specified at runtime through the
use of the element <xsl:param/>
. To pass
runtime parameters to the XSLT processor, you can set it inside USERDATA message
meta-data. This is under the XSLTRuntimeParams key in the Pre-Procs of the XSLT
Route Details for XSLT.
For example:
keylget args MSGID mh
# get old USERDATA value
set userData [msgmetaget $mh USERDATA]
# set runtime parameters
keylset userData XSLTRuntimeParams {{PARAM1 Value1} {PARAM2 Value2}}
msgmetaset $mh USERDATA $userData
lappend dispList "CONTINUE $mh"
-
XSLTRuntimeParams
contains a keyed list of parameter-value pairs, for example,{{PARAM1 Value1} {PARAM2 Value2}}
. - The Runtime Parameters field can take a Tcl keyed list of parameter-value pairs that are embraced by double quotes as input.
- The value entry of each pair should contain a valid XPath expression. In particular, string literals should be enclosed in single quotes. Special characters in Tcl should be escaped using the forward slash.
For example, this is a list of valid runtime parameters:
"{NAME {‘John Doe’}} {COMMENTS {‘THIS IS A \{test\}’}} {XPATH_VALUE {PEOPLE/PERSON}}"