How to Add Global Parameters

Parameters can be added to the XSLT map editor both as global parameters and named template parameters.

You can add global parameters when creating an XSLT map. See How to Create an XSLT Map for more details. You can also add global parameters to an existing map.

To add a global parameter to an existing map:

  1. Right-click any node in the source pane, and select Add Global Parameter from the context menu.

    Alternatively, click the Add icon, identified by the green plus sign, in the XSLT toolbar, and select Add Global Parameter. Figure 41-43 shows the XSLT toolbar, which resides at the top of the XSLT Map Editor.

    Figure 41-43 Adding Global Parameter from the XSLT Toolbar

    Description of Figure 41-43 follows
    Description of "Figure 41-43 Adding Global Parameter from the XSLT Toolbar"

    You can also right-click anywhere on the canvas (center) pane, and select Create > Add Global Parameter from the context menu.

    The Add Parameter dialog appears. Figure 41-44 shows the Add Parameter dialog.

    Figure 41-44 Add Parameter Dialog

    Description of Figure 41-44 follows
    Description of "Figure 41-44 Add Parameter Dialog"
  2. Enter a Local Name for the parameter and optionally specify a namespace.

    If the parameter is a complex parameter, you can specify a schema and an element definition for the parameter. Click the Help button in the dialog to get more information on the individual fields.

  3. Click OK in the Add Parameter dialog to create the parameter.

The parameter node appears at the appropriate place in the target pane (for Map View) or XSLT pane (for the XSLT View). This enables you to map XPath expressions to the parameter to set the parameter's default value.

The parameter also appears in the source tree. This enables you to map the parameter to XPath expressions or nodes in the XSLT tree.

Note:

You can also add parameters like other XSLT elements. See How to Add XSLT Statements for details about adding XSLT elements using the context menu or Components window.