XSL Transformation

FrameMaker provides options for processing XML. FrameMaker also allows XML import and export to support XSL transformations, and the Schema language for grammar and rule definition (see XML with schema). You can import an XML document that uses schema, automatically creating a Document Type Definition (DTD) from the referenced schema, or you can create an Element Definition Document (EDD) directly from a schema definition. You can also validate against an associated schema upon both import and export.

XSL (EXtensible Stylesheet Language) is a style sheet language for XML documents. XSLT (Exten­sible Stylesheet Language Transformation) is the means by which transformations defined in XSL are applied to XML documents.

XSL is a set of the following three specifications:

XSLT

A language for transforming XML documents.

XPath

A language for navigating in XML documents.

XSL-FO

A language for formatting XML documents.

FrameMaker includes an XSLT processor that allows you to associate an XSLT file with an XML structure application or XML document, and apply the transformations defined in that document when importing from or exporting to XML. FrameMaker supports W3C XSLT 1.0 recommenda­tions. You can change the XSLT processor by editing the maker.ini file or from within your struc­tured application.

New elements (SmartPaste, PreProcessing, PostProcessing) in the structure application (XSLTPreferences in the Stylesheets element of XMLApplication) allow you to specify an XSLT file as part of your XML structure application, to be used for both import and export.

The xml-stylesheet processing instruction (PI) now allows you to specify an XSL file in an XML markup document, which supersedes any XSLT specified in the structure application when importing that document.

Upon import, XSL transformations are applied before the default read rules or any additional read rules you have defined. That is, the result of applying an XSL transformation on import is a new file, which (if it is an XML file) is passed to the read/write rules.

Upon export, XSL transformations are applied after the default or explicit write rules. The result of applying read/write rules on export is a new XML file, which, if it is valid, is passed to the XSLT processor.

You can create a hypertext output (XML or HTML) from an XML file using an XSL. You can create and save reusable transformations in an XML file. The reusable transformations include information such as the name and path of the XSLT and the path of the input and output files.

The output is created using a parser installed on the machine and registered with FrameMaker through maker.ini settings. XALAN and SAXON are installed by default on your machine with FrameMaker. XALAN supports XSLT 1.0 and SAXON supports XSLT 2.0. Both XALAN and SAXON are JAXP compliant.

SAXON is the default parser used when XSL is run directly or no transformation-specific parser is specified. However, you can specify a new default processor in the maker.ini file using the following flags:

[XSLTProcessors]
;processorName=jar path(all dependent jars should be in same dir), TransformerFactory class, default if default processor(if not specified - 1st processor would become default.)

XALAN=fminit\XSLT\XSLTProcessors\xalan\xalan-j_2_7_1-bin\xalan.jar, org.apache.xalan.processor.TransformerFactoryImpl

SAXON=fminit\XSLT\XSLTProcessors\saxon\saxonhe9-3-0-5j\saxon9he.jar, net.sf.saxon.TransformerFactoryImpl, Default

An XSL transformation includes information such as XSL, Parser, and Output folder, to create an output from XML files. The transformation that you create are stored in an XML file. There are two types of transformations: default and application-specific. The default transformations are stored in the file as specified in the maker.ini file using the TransformationFilePath flag. The applica­tion-specific transformations are stored in an XML file that you specify for the structured applica­tion in the structapps.fm file.

The XSLT toolbar maintains a history of the transformations you use and lets you use Advanced Run feature to create output from multiple XML files. From the toolbar, you can also choose and run a transformation\XSL on the open file. For more information, see Create output from multiple files using Advanced Run.

op_xslt_toolbar.png

 

A. Click to select an XSL file B. Click to select a transformation C. Run the selected transformation or XSL D. Click to display the Advanced Run dialog


September 30, 2016

Legal Notices | Online Privacy Policy