XSLT Parameters
The global parameters of the XSLT stylesheet used in a transformation scenario can be configured by using the Parameters button in the XSLT tab of a new or edited transformation scenario dialog box.
The resulting dialog box includes a table that displays all the parameters of the current XSLT stylesheet, all imported and included stylesheets, and all additional stylesheets, along with their descriptions and current values. You can also add, edit, and remove parameters, and you can use the Filter text box to search for a specific term in the entire parameters collection. Note that edited parameters are displayed with their name in bold.
If the XPath column is selected, the parameter value is evaluated as an XPath expression before starting the XSLT transformation.
Example:
doc('test.xml')//entry
//person[@atr='val']
- The doc function solves the argument relative to the XSL stylesheet location. You
can use full paths or editor
variables (such as ${cfdu} [current file directory]) to
specify other locations:
doc('${cfdu}/test.xml')//*
- You cannot use XSLT Functions. Only XPath functions are allowed.
Below the table, the following actions are available for managing the parameters:
- New
- Opens the Add Parameter dialog box that allows you to add a new parameter to the list. An editor variable can be inserted in the text box using the Insert Editor Variables button. If the Evaluate as XPath option is selected, the parameter will be evaluated as an XPath expression.
- Edit
- Opens the Edit Parameter dialog box that allows you to edit the selected parameter. An editor variable can be inserted in the text box using the Insert Editor Variables button. If the Evaluate as XPath option is selected, the parameter will be evaluated as an XPath expression.
- Unset
- Resets the selected parameter to its default value. Available only for edited parameters with set values.
- Delete
- Removes the selected parameter from the list. It is available only for new parameters that have been added to the list.
- The default value of the parameter selected in the table.
- A description of the parameter, if available.
- The system ID of the stylesheet that declares it.