Enabling parameter groups

In a user-defined pattern, control whether parameter groups are enabled based on the values of pattern parameters.

Before you begin

Complete the following tasks:

About this task

By default, when pattern users configure an instance of a user-defined pattern, all the parameter groups that are defined in the user-defined pattern are enabled. Enabled parameter groups and pattern parameters within those groups are visible to pattern users in the Configure Parameters page. You can control whether a parameter group in an instance of a user-defined pattern is enabled by using an XPath expression:
  • If the expression evaluates to Boolean true, the parameter group is enabled. When a pattern user configures an instance of a user-defined pattern, the parameter group and pattern parameters within that group are visible to pattern users in the Configure Parameters page. The values of pattern parameters within enabled parameter groups populate the target properties of the user-defined pattern.
  • If the expression evaluates to Boolean false, the parameter group is disabled. When a pattern user configures an instance of a user-defined pattern, the parameter group is not shown to pattern users in the Configure Parameters page. Pattern parameters within disabled groups are not shown to pattern users and the values of those parameters do not populate the target properties in an instance of the user-defined pattern.
If no XPath expression is entered for a parameter group, the parameter group is enabled. For XPath reference information, including information about XPath functions, see W3C XPath 1.0 Specification.
The pp:getValue() function is included, in addition to the functions in the XPath 1.0 Specification. The pp:getValue() function takes the parameter ID of a pattern parameter and returns the value of that pattern parameter. To see the parameter ID for a pattern parameter:
  1. In the Pattern Configuration tab of the Pattern Authoring editor, double-click a parameter group, or select a parameter group and click Edit. The Edit Group window opens.
  2. Click the Visibility tab. The parameter IDs for pattern parameters are shown in the Parameter ID column of the Pattern Parameters table. To change parameter IDs, see Changing pattern parameter IDs.

Procedure

To control whether a pattern parameter group is enabled by using an XPath expression:

  1. In the Pattern Configuration tab of the Pattern Authoring editor, double-click the parameter group that you want to control, or select the parameter group and click Edit.
    The Edit Group window opens.
  2. Click the Enable tab. Create an XPath expression for your chosen parameter group:
    • To select a function:
      1. Expand Boolean, Number, Pattern, or String in the Functions section, then click a function. The function is displayed in the Function name field.
      2. Click Use. The function is inserted into the Expression field at the cursor.
    • To select an operator:
      1. Click an operator in the Operators section. The operator is displayed in the Operator field.
      2. Click Use. The operator is inserted into the Expression field at the cursor.
    • To select a pattern parameter:
      1. Click a pattern parameter in the Pattern Parameters table. The parameter ID shown in the Parameter ID column of the Pattern Parameters table for the chosen parameter is displayed in the Parameter ID field.

        You cannot select a pattern parameter that uses a table type.

      2. Click Use. The parameter ID is inserted into the Expression field at the cursor. To change parameter IDs, see Changing pattern parameter IDs.
    • You can also edit the expression directly in the Expression field.
  3. Repeat the actions in step 2, as required, to create your XPath expression.
  4. You can now choose whether to test your expression: