User Guide > Procedures > XSLT Procedures > Designing Parameters for an XSLT Procedure
 
Designing Parameters for an XSLT Procedure
If you want to create a script by first designing its parameters, you must design the parameters in the Parameters Panel and then write a procedure in the XSLT panel.
For more on execution, see Executing a Procedure or Parameterized Query.
To design the parameters for an XSLT in the Parameters panel
1. Create a new XSLT procedure as described in XSLT Procedures.
2. Select the Parameters tab.
3. Check the Design Mode check box at the top right to make the Parameters panel editable.
4. Click the Add button to start adding parameters, and select a data type.
When you click Add and select a data type, a new parameter is added with a default name and the specified data type.
Supported data types are:
Binary—BINARY, BLOB, VARBINARY
Decimal—DECIMAL, DOUBLE, FLOAT, NUMERIC
Integer—BIGINT, BIT, INTEGER, SMALLINT, TINYINT
String—CHAR, LONGVARCHAR, VARCHAR
Time—DATE, TIME, TIMESTAMP
Complex—CURSOR, XML
The Browse option opens an Add Definition Type window in which you can select an XML schema definition set, select Type in the Show pane on the right, and select a type from the list. See Definition Sets for details on definition sets.
5. Right-click the default parameter name, choose Rename, and type a new name.
6. Optionally, change a parameter’s data type:
a. Right-click the data type name and select Change Type.
b. Right-click the parameter name or data type, and select a data type from the drop-down list.
c. Optionally, specify the length or the number of digits for certain data types.
d. Click OK.
7. Select the parameter, and click Cycle I/O Direction to indicate whether the parameter is input, output, or both.
The Cycle I/O Direction button is not available for parameters that are part of a cursor.
8. Use the navigation buttons to move a parameter up, down, left, or right.
The up and down navigation buttons are enabled when there is more than one parameter.
The left navigation button is enabled for a CURSOR parameter. The right navigation button is enabled for a parameter in a row immediately after the last parameter in a CURSOR. After specifying all of the parameters you want to define, save the edits.
9. In the XSLT panel, complete the procedure using the parameters designed in the Parameters panel.
10. Save the procedure.
After the parameters in the design match the parameters in the script on the XSLT panel, the name of the script is displayed in black.
Parameter Entry
When you click the icon to execute an XSLT procedure with parameter input, an Input Values for <procedure_name> dialog box appears. It displays parameter names down the left side, and prepared XML code fragment with a question mark that you can replace with the input value.
You can replace the question mark with an input value, or check the Null box to eliminate the XML code fragment.