|
FopProcess Element |
|
|
FopProcess element of the Reporter component utilizes the Apache's Formatting Objects Processor to render the fo documents into PDF documents.
Parameters Template Type (Accepts MScript) The type of the template that will be used in the document rendering. The valid types are:
Template File (Accepts MScript) Depending on the Template Type selection, this property should either be given a XSL-Fo document or a Fo document name. The template files can be prepared using third-party XSL-Fo or Fo editors and can be inserted into the project in order to be deployed to the web application. Output Type The only valid value is "1. PDF"
Output File Name (Accepts MScript) The name of the output document file. It can be the name of either a permanent or a temporary file. Note that the temporary files are created under {WEB_APPLICATION_ROOT}/WEB-INF/MM-INF/~tempfiles directory and the names of the files are stored in pool variables or in process record fields. MoreMotion constantly scans the temporary files under this folder and deletes the expired files.
Examples:
If the Template Type is XSL-Fo, then you should specify symbols whose content will construct the XML data required for the XSLT processing. The symbols that can be specified here is as follows:
You can specify one or more fields of different sort by delimiting them with commas. Example: f:Name, i:Quantity, v:Status, LastWeekOrders
XML Fields: Please note that a process record field or a pool variable can store XML data. An ADOM (MoreMotion Data Object) can be converted to XML and stored in a process record field or in a pool variable with AML function ToXml(). AML functions can be executed with "mor > ADOM > AMLProcess". Generating XML data out of the values of the specified fields: It is important to know the structure of the XML data created in order to successfully bind the XML nodes to element properties when developing the XSL-Fo document. Assume that the specified fields contain the following values at the time the FopProcess is executed. f:Name i:Stock v:Status LastWeekOrders ----------- --------- ---------- --------------------------------------- Printer 12 Discounted <item> <custid>5</custid> <qty>5</qty> </item> <item> <custid>33</custid> <qty>20</qty> </item>
The FopProcess will create the XML data below prior to the XSLT processing to generate the eventual Fo document.
|