Basic concept

We will show you the basic concept behind XSL Report Designer and how it produces a print layout.

Structure of XML data and the correspondence to the print layout of the form or report

XSL Report Designer creates a layout design for printing predefined forms and reports containing XML data. The XML data for printing is assumed to have a constant repetition pattern in the tree structure. It is not possible with XSL Report Designer to design a layout for documents such as general books and technical manuals because they do not have a constant repetition pattern within tree structure of their XML data.

XSL Report Designer matches the repetition pattern of the XML data to the repetition pattern in the print layout of the form or report. To do this XSL Report Designer supports three types of print layouts; Fixed type, Flow type and Label type. Let's take a look at how XSL Report Designer relates the repetition pattern of the tree structure of the XML data to the repetition pattern in three kinds of print layouts.

Fixed type (used for predesigned fixed forms)

The Fixed type layout pattern repeats the same pattern on each page or group of pages as shown in the figure. Thus, one repetition of the XML tree is applied to one page or group of pages in the final formatted output. In the XML tree the element at the first position of the overall report or form is considered the main repeat element. Whenever the main repeat element appears in the XML data a new page or group of pages is created in the report.

ov-fixed

Flow type (used for reports and dynamic forms such as invoices and statements)

The Flow type layout pattern is used when the XML data contain elements that are repeated multiple times in the XML tree. The fields or pages in the report expand to accommodate the XML content onto the paper as shown in the following figure. In the Flow type the limits of the page are not set by the unit of the repetition.

ov-var

Label type

The Label type divides the paper into user defined units, as shown in the following figure, called labels. The same output pattern is repeated label by label by starting each new label at the main repeat element.

ov-tac

How XSL-FO is generated and printed from XML data

The layout that XSL Report Designer designs is called the "Project" and the information about the design is preserved as a Project File.

The building blocks XSL Report Designer uses for a design are called "Objects." Though there are various kinds of objects, the one most frequently used is a text object. Using the text object as an example, let's take a brief look at how the process works.

In XSL Report Designer text objects are not concrete text character strings such as in DTP and word processors. Instead the text objects are like an empty containers that ultimately will have text placed into them.

The text object supports two different kinds of text, "Static" and "Field." For the static text object the text character string is input through XSL Report Designer's GUI. For the field text object text is flowed into the object by setting the path to the element of data to be printed (this is called the "XML path") .

The Runtime Engine bundled with XSL Report Designer then takes the XML file to be printed and the project file that describes the desired layout and generates XSL-FO. Within the generated XSL-FO the static text object in the layout now becomes a block object (fo:block). As for the field text object, the content of the element specified by "XML path" is also output as the content of a block object (fo:block). The resulting XSL-FO file is then input to XSL Formatter to produce the final print and PDF files.

It's important to note that the tree structure of the XML data is reflected in the XSL-FO that the Runtime Engine outputs. The main repeat element is outputted in XSL-FO along with subordinate elements in the XML tree. This process is repeated based on the number of times the main repeat element appears in the XML data.

ov-text

Using a XSL stylesheet

XSL Report Designer can generate a XSL stylesheet from the project file.

When a XSL stylesheet is generated from the project the XML data and the XSL stylesheet are then submitted to an XSLT processor. The XSLT processor then outputs XSL-FO. The properties in the XSL-FO are the same as those generated by the Runtime Engine, but the use of XSL stylesheet has certain limitations such as not being able to use the calculation expressions set by the project file of XSL Report Designer.

ov-text

Object

The following are the diffent kinds of Objects supported by XSL Report Designer:

We will explain the most important objects here. The Online help and Product Manual explains the details of each object. (Note: In the following explanations the word "object" is omitted when the meaning is clear.)

Document and Repeat objects

The document object is the highest level object and contains the entire report to be printed. The entire tree structure is contained within the document object, which is the root of the tree.

The repeat object corresponds to that part of the XML data that is repeated in the print layout of the report. For instance, the page corresponds to the repeat object when each one of the records in the data is output to one page. In XSL Report Designer the repeat object is put directly after the document object in the structure. This is then the main repeat of the project. Fixed, flow and label layouts can only have one Main repeat object. In Fixed and Flow layouts the main repeat is the only repeat object. Here you would associate the path of the main repeat to the main repeat element in the tree structure of the XML data. When the report is formatted the main repeat object and its subordinate objects will be repeated based on the number of times the main repeat element is in the XML data.

Flow type layouts can have multiple repeat objects put in subordinate positions to the main repeat. These are called sub repeat objects. The following figure illustrates the relationship of sub repeat elements within the XML data to the formatted page.

ov-subrepeat

Tables

With Report Designer it is also possible to flow the repeating elements of the XML data to a table within the form by using the table object. The following is an output example of a table where the rows correspond to the repeated elements, and the cells of each row are set to output the childen elements of the repeated element. The number of rows in the table is the same as the number of repetitions of the data to print.

ov-table

Properties

"Property" is the display style, print attributes, characteristics, etc. of how objects are treated in the print layout.

For instance, the property(ies) of a text object can be the position on the page (X Y coordinates), the width and height of the object, the font, fontsizes, the character styles, the character decorations, color etc..

The Properties that can be set differ according to the object. Please refer to "Properties list".


Copyright © 2004-2008 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.