Added XSL

Previous Next

Added XSL, idea

In certain places in upgrade scripts, you can easily "mix in" added XSL transformations.

This is similar to the possibility of adding XSL that a number of Delivery Manager actions offer through an optional task step parameter of type Custom XSL. For example, you can attach an XSL transformation to the "Export deliverable appdata" action. This will result in that XSL transformation being applied to the output of the export operation.

By adding XSL, you can easily filter out unwanted information that would otherwise remain in the result file, such as maybe log stamps, confidential information, or history information.

Find out about adding XSL in task step parameters via Delivery Manager actions by name. The remainder of this help topic is about adding XSL in upgrade scripts.

In upgrade scripts, you can add XSL to transform:

The result of executing an INVOKE XML.EXPORT statement.

The input file that is passed to an INVOKE XML.IMPORT statement.

Added XSL, implementation

In a SQL statement contained in an upgrade script, you are allowed to specify an XSL transformation in the "Added XSL" field if the statement is of one of the following types:

INVOKE XML.EXPORT ...

INVOKE XML.IMPORT ...

and also when the statement is an INVOKE USXSL.APPLY2FILE statement with the $$xsl path placeholder as its 2nd argument, for example:

INVOKE        USXSL.APPLY2FILE WITH SELECT

         '$$unpack\scripts\Addresses.xml'

,                '$$xsl'

,                '$$unpack\scripts\New_Addresses.xml'

 

When you check the upgrade script, the added XSL code is applied as follows:

Added To

Added How

XML.EXPORT

1. The XSL transformation is output to an .XSL file in the using folder.

2. The XSL is applied to the result file AFTER it is exported:

An INVOKE USXSL.APPLY2FILE statement is generated AFTER (appended to) the INVOKE XML.EXPORT statement. This statement has an absolute path pointing at the .XSL file.

XML.IMPORT

1. The XSL transformation is output to an .XSL file in the using folder.

2. The XSL is applied to the result file BEFORE it is imported:

An INVOKE USXSL.APPLY2FILE statement is generated BEFORE (prepended to) the INVOKE XML.IMPORT statement. This statement has an absolute path pointing at the .XSL file.

USXSL.APPLY2FILE

1. The XSL transformation is output to an .XSL file in the using folder.

The XSL is applied by replacing the $$xsl placeholder by an absolute path pointing at the XSL transformation.

You can view the implementation by selecting the Output Statement tab page in the Current Upgrade Scripts window.

 

See Also

Stashing