Show TOC

Declaring Transformer ParametersLocate this document in the navigation structure

Use

When adding transformers, the provider can define parameters that will control the behavior of the transformer. These parameters are visible in the XML iView editor. The rules that should be applied when providing parameters in transformer are as follows:

Parameters types

Providers can decide that certain parameters should not be exposed to the editor by not putting the parameters in the list of parameters.

SAX Transformers Parameters

Every SAX handler must implement the ITransformerProperties interface that declare the method getInputProperties(). This method returns a map with the editable parameters of the SAX handler. The map keys are the names of the parameters. The values of the map can be of two types:

  • String objects representing the default value.

  • List of objects representing the valid options of the parameter. The first value in the list is the default value.

XSL Transformers Parameters

The parameters are declared in the standard XSL way, using xsl:param elements. Controlling the type of the parameter is done by using two additional attributes:

  • Type sap:param

    This entry controls if this parameter is editable. Possible values are:

    • hidden

      Non-editable parameter

    • visible (default)

      Editable parameter.

    Example:

    <xsl:param name="ResourceBundle" sap:param-type="hidden"/>

  • Option sap:param-options

    Thos entry declares a list of possible values for the parameter.

    Syntax: sap:param-options="<default value>;<second value>;...".

    Example:

    <xsl:param

    name="ShowDatesMode"

    sap:param-options="MAIN_ONLY;ALL;ITEMS_ONLY">ITEMS_ONLY

    </xsl:param>

Note

When using XSL parameters you must declare the namespace accordingly.

Example:

xmlns:sap="http://www.sap.com/2004/Transformers/1.0" .