XML TRANSFORM FILE

This statement has the following parameters:

Parameter Description
InputDocumentName A nonnumeric literal or an identifier of an alphanumeric data item, the value of which is the file name of the file containing the XML document to be transformed.
StyleSheetName A nonnumeric literal or an identifier of an alphanumeric data item, the value of which is the name of a file containing an XSLT stylesheet that will be used to transform the input document.
OutputDocumentName A nonnumeric literal or an identifier of an alphanumeric data item, the value of which is the file name of the file containing the transformed XML document after successful completion of the statement.

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.