The functionality of StyleVision together with the various XSLT and output files generated by StyleVision provide powerful automation possibilities. This section describes these capabilities.
StyleVision's file-generation functionality
After you have created an SPS design with StyleVision, you can generate several kinds of XSLT and output files from within the GUI, depending on which edition of StyleVision you are using (Enterprise, Professional, or Basic). The following files can be generated with the File | Save Generated Files command:
•XSLT files for HTML, RTF, FO, and Word 2007+ output.
•FO files, which can be passed to an FO processor (such as Apache's FOP) for creation of PDF output.
•HTML, RTF, PDF, and Word 2007+ output.
As you will notice from the list above, the files that can be saved with StyleVision are of two types:
1.The XSLT files generated by the SPS design, and
2.The final output files (such as HTML).
|Note:||Additionally, if database sources are used, XML Schema and XML data files can be generated based on the database structure and content.|
The processes to generate the final HTML, RTF, and Word 2007+ output files are all one-step processes in which the XML document is transformed by an XSLT stylesheet to the output format. The PDF-generation process, however, requires two steps:
1.Transformation of XML to FO by using an XSLT stylesheet. StyleVision can generate both the XSLT file and the FO file.
2.Processing of the FO file with an FO processor (such as Apache's FOP) to produce PDF output. If an FO processor is set up to be used with StyleVision, then StyleVision can generate PDF output by first transforming the XML to FO using the built-in Altova XSLT Engines, and then processing the FO to PDF with the FO processor you have set up.
FOP and XSLT
One FOP option enables you to specify an input XML file, an input XSLT file, and an output PDF file:
fop -xml input.xml -xslt input.xslt -pdf output.pdf
In this situation, FOP uses its built-in XSLT engine to carry out the first-step XML-to-FO transformation. It then passes the result FO document to FOP for the second-step FO-to-PDF processing.
You should be aware, however, that FOP's built-in engine might not support all the XSLT features that StyleVision and RaptorXML support. Consequently, there could errors if an XSLT stylesheet generated by StyleVision is specified as an input for an XML transformation using FOP's built-in XSLT engine. In such cases, use the XSLT engine of RaptorXML+XBRL) Server to transform to FO, and then supply the FO file to FOP for processing to PDF.
StyleVision Server and RaptorXML: generating files from outside the GUI
Additionally to generating XSLT stylesheets and the required output formats via the StyleVision GUI (File | Save Generated Files command), you can generate output files using two other methods:
1.With StyleVision Server, which calls StyleVision's file generation functionality without opening the GUI, you can produce various kinds of output.
2.With RaptorXML, a standalone Altova application that contains Altova's XML(+XBRL) Validator, and XSLT and XQuery Engines. The XSLT Engines in RaptorXML can be used for transformations of XML to an output format by processing XML documents with XSLT stylesheets. The XSLT file will have to be created in advance so that it can be used by RaptorXML. (RaptorXML does not take an SPS as an input parameter.) The advantages of using RaptorXML are: (i) speed, as a result enabling fast transformations of large files; and (ii) in addition to a command line interface, RaptorXML provides interfaces for COM, Java, and .NET, and can therefore be easily called from within these environments. How to use RaptorXML for transformations is explained in the sub-section RaptorXML.
3.Multiple transformations can be carried out according to pre-set triggers (such as a daily time) using Altova StyleVision Server within an Altova FlowForce Server workflow. This is described in the section Automation with FlowForce Server.