Previous Topic Next topic Print topic


XML TRANSFORM FILE

This statement has the following parameters:

Parameter Description
InputDocumentName The filename of the document to transform (the input document).
StyleSheetName The filename of the XSLT stylesheet used for the transformation.
OutputDocumentName The filename of the transformed document (the output document).

Description

The XML TRANSFORM FILE statement transforms the XML document specified by the InputDocumentName parameter using the XSLT stylesheet specified by the StyleSheetName parameter into a new document specified by the OutputDocumentName parameter. The new document may or may not be an XML document depending on the XSLT stylesheet.

A status value is returned in the XML-data-group data item, which is defined in the copybook, lixmldef.cpy.

Examples

With an External XSLT Stylesheet:

XML TRANSFORM FILE
    "MY-IN-DOCUMENT"
    "MY-STYLESHEET"
    "MY-OUT-DOCUMENT.
IF NOT XML-OK GO TO Z.

With an External XSLT Stylesheet and Parameters:

XML SET XSL-PARAMETERS
     "MY-COUNT", 7.
IF NOT XML-OK GO TO Z.
XML TRANSFORM FILE
    MY-DATA-ITEM
    "MY-DOCUMENT.XML"
    "MY-MODEL-FILE"
    "MY-STYLE-SHEET"
IF NOT XML-OK GO TO Z.
Previous Topic Next topic Print topic