Previous Topic Next topic Print topic


XML SET XSL-PARAMETERS

This statement has the following parameter:

Description

Parameter

Description

Parameter list

A list containing at least one name/value pair to be used whenever transform operations are performed.

The XML SET XSL-PARAMETERS statement passes a list of name/value pairs to XML Extensions, where they are stored until one of the following occurs:

  • They are replaced by a subsequent execution of an XML SET XSL-PARAMETERS statement.
  • They are cleared by executing an XML CLEAR XSL-PARAMETERS statement.
  • They are cleared by flushing the cache (the statements XML INITIALIZE, XML ENABLE CACHE, XML DISABLE CACHE, XML FLUSH CACHE, and XML TERMINATE all clear the cache).
  • The COBOL run-unit terminates.

The saved parameters are used whenever any of the following transform operations occur:

  • The XML TRANSFORM FILE statement is executed.
  • The XML EXPORT FILE, XML EXPORT TEXT, XML IMPORT FILE, or XML IMPORT TEXT statements reference an optional stylesheet.

A maximum of 20 name/value pairs may be specified. If more than 20 pairs are specified or the parameters are not specified as pairs, an error will be reported.

Note: In managed code, the name/value arguments are restricted to alphanumeric (PIC X) data items or literals. To use numeric, numeric literal (as in the example below), or other data item types use the XML SET XSL-PARAMETERS-NEW statement instead. See Managed Code Considerations for more information.

Example

XML SET XSL-PARAMETERS
 "MY-COUNT", 7.
IF NOT XML-OK GO TO Z.
Previous Topic Next topic Print topic