XSLT (Extensible Stylesheet Language Transformations) stylesheet files are used to transform an XML document into another XML document or another type of document-not necessarily in XML format; for example, HTML, PDF, RTF, and so forth. An XSLT stylesheet is an XML document. XML Extensions has specific statements, XML TRANSFORM FILE and XML TRANSFORM TEXT, which are used for performing XSLT stylesheet transformations. In addition, the import and export statements, XML IMPORT FILE, XML IMPORT TEXT, XML EXPORT FILE, and XML EXPORT TEXT, allow an external XSLT stylesheet to be specified as a parameter, making it possible to transform a document while importing or exporting XML documents.
The format of XML documents generated by XML Extensions matches the form of the specified COBOL data structure. Often the COBOL developer must process XML documents that are defined by an external source. It is likely that the format of the COBOL-generated XML document will not conform to the document format that meets the external requirements.
The recommended course of action is to use an external XSLT stylesheet file to transform between the COBOL-generated XML document format and the expected document format. XSLT stylesheets are extremely powerful.
Keep in mind that XSLT stylesheets are unidirectional. Therefore, it is possible that you will have to design two external XSLT stylesheets for each COBOL data structure: one for input, which converts the required document format to COBOL format, and one for output, which converts COBOL format to the required external format.