The global parameters of the XSLT stylesheet used in the transformation scenario are
configured from the dialog available from the Parameters button:
The table presents all the parameters of the XSLT stylesheet, all imported and included
stylesheets and all additional stylesheets with their current values. If a parameter value
was not edited then the table presents its default value. The bottom panel presents the
default value of the parameter selected in the table, a description of the parameter if it is
available and the system ID of the stylesheet that declares it.
For setting the value of a parameter having a namespace, for example like:
<xsl:param name="p:param" xmlns:p="namespace">default</xsl:param>
use the following expression in the Name column of the
Parameters dialog:
{namespace}param
If the XPath column is checked, the parameter value is evaluated as an
XPath expression before starting the XSLT transformation.
For example you can use expressions
like:
doc('test.xml')//entry
//person[@atr='val']
Note:
- The doc function solves the argument relative to the XSL stylesheet location. You
can use full paths or editor variables like ${cfdu} (current file directory) to
specify other locations: doc('${cfdu}/test.xml')//*
- You cannot use XSLT Functions. Only the XPath functions are allowed.
The following actions are available for managing parameters:
- New - Adds a new parameter to the list.
- Edit - Edits the value of the selected parameter.
- Unset - Resets the selected parameter to its default value.
Available only for parameters with set values.
- Delete - Removes the selected parameter from the list. It is
enabled only for parameters added to the list with the New
button.
The editor variables displayed at the bottom of the dialog (${frameworks},
${home}, ${cfd}, etc) can be used in the values of the parameters to make the
value independent of the location of the XSLT stylesheet or the XML document.
The value of a parameter can be entered at runtime if a value
ask('user-message', param-type, 'default-value' ?) is used as value of parameter in
the
Configure parameters dialog:
- ${ask('message')} - Only the message displayed for the user is
specified.
- ${ask('message', generic, 'default')} - 'message' will
be displayed for the user, the type is not specified (the default is string), the default
value will be 'default'.
- ${ask('message', password)} - 'message' will be
displayed for the user, the characters typed will be replaced with a circle
character.
- ${ask('message', password, 'default')} - Same as above, default value
will be 'default'.
- ${ask('message', url)} - 'message' will be displayed
for the user, the type of parameter will be URL.
- ${ask('message', url, 'default')} - Same as above, default value will
be 'default'.