Output jobs
Output jobs aka output formats are adapls and/or Word templates, or adapls and/or XSLT stylesheets, or Excel templates that are used to print data from marked records in a specified way (selected fields in a specific layout). All the output jobs that you specify for a data source will be listed in the File > Output formats menu in Adlib and in the Output formats dialog in Axiell Collections.
Collections supports Word templates with the .docx extension, it supports output adapls using the wordcreatedocument function (to print to a .docx template), it supports output adapls using print and output statements, it supports output formats which have been specified as a combination of an adapl and a .docx template, it supports XSLT stylesheets and XSLT+adapl combinations and it also support Excel .xlsx templates as output formats. Word templates with the .dot or .dotx extension are not supported.
• | XSLT stylesheet - For creating any type of report, simple or complex, one or more XSLT stylesheets may be put to use. XSLT (Extensible Stylesheet Language Transformations) is a standardized language (an XML variant) for converting an XML document to a differently structured XML document or to a document in another format, for instance an HTML or text document. During transformation, the data from the original XML document can also be processed in other ways. Moreover, XSLT has programming language characteristics like constants and functions. Collections stores records as XML and when you execute an XSLT output job, this XML is passed on to the stylesheet which converts the XML to the desired format: this target format would need to be HTML if it concerns an output format (Collections will actually print or display the generated HTML page). Which XML type (unstructured or grouped) must be generated by Axiell Collections, can be set per XSLT Output job in the XML type option. Collections XML is formatted according to the adlibXML.xsd (an XML Schema Definition). The most important thing you need to know about that XML format is that only the XML tags of the three highest levels have been defined, namely: adlibXML (root tag), recordlist (may occur only once), record (may occur indefinitly). Further, there is a diagnostic tag on the level of the recordlist, which contains metadata. The structure of a Collections record itself is not defined in the schema definition because this differs per database and XML type. It's easy though, to obtain an example of the generated XML, by exporting a few marked records to an Unstructured or Grouped XML file from your Collections application. The main advantage of the grouped type over the unstructured one is that it becomes easier to process repeated occurrences of grouped fields. In unstructured XML, all fields and field occurrences are just listed in one long list inside the <record> node, whilst in grouped XML, fields are grouped within a field group node (if a relevant field group exists in the data dictionary) and that field group node is repeated for each field group occurrence. Whenever you create an XSLT stylesheet for unstructured XML, which must be able to collect field data per field group occurrence, you have no choice but to always count the “position” of every processed field occurrence because that’s the only way to retrieve the other fields from the same position. In grouped XML on the other hand, there’s no need for such a workaround because every field group occurrence is contained within its own field group node. Matching an XSLT template to a field group node automatically provides access to all grouped fields with the same occurrence number (in other words: at the same position). Further note that XSLT 3.0 and earlier versions are supported from Collections 1.14: only XSLT 1.0 was supported before that. Of XML, both version 1.0 and 2.0 are supported, and XSLT 1.0 can be used in an XML 2.0 document if needed. More information about using XSLT for Axiell Collections can be found in the separate Programming XSLT stylesheets for Adlib and Axiell document. |
• | Adapl - For creating advanced reports, for which pre-processing of data is necessary, the Axiell programming language ADAPL can be used as well as XSLT. Current Collections applications all use ADAPL programs, but if you feel that the non-standard nature of the Axiell proprietary ADAPL programming language limits the maintainability of your output formats, then you may choose to build your output formats in XSLT. However, in combination with a Word template or XSLT stylesheet, any complex calculations, manipulations of field contents, etc. will usually have to be managed by an adapl. Any data output by adapl to be used by an XSLT stylesheet must always be present in one of the fields of the currently processed record, so if you'd like to print some compiled or calculated data you'll have to put that in fields which you've defined as temporary fields in the relevant .inf. Output adapls for Collections that do not use Word templates or XSLT stylesheets, will also have to manage the layout of the data to be printed, with PRINT and OUTPUT statements. And PDEST can be used to specify the output file type. |
• | Word template - Microsoft Word can be used by Axiell Collections very conveniently for creating mailings, labels and documents in which the company style of an organisation is very important. For this purpose, default Word templates can be edited to enable printing of Collections data with such a template. Documents that are created this way, can be saved, printed or sent through e-mail. You can set up all available Word templates as output formats if you like or let users select an appropriate template on-the-fly. Only for label templates it is really necessary to set up the Word template as an output format. See the online Collections Help for more information about creating a Word template output format. |
• | Adapl and Word template - To use this combination, you can choose to set both an adapl and a Word template in the properties of an output job, in which case a Word document is filled with data after the adapl for pre-processing the record data has been carried out, or just set the adapl and no Word template, in which case the Word template must be called from within the adapl. The difference to the print result is that if you generate Word documents from within an adapl, you can choose if and when to call the template, while setting the template in the output job properties means it will be called automatically every time after processing a record with the adapl. In both cases, the adapl should not contain any PRINT or OUTPUT statements. |
See also
Accessing the application setup