Altova StyleVision 2024 Enterprise Edition

An SPS can be designed to have multiple document sections, with each document section having its own page definition settings. For example, a report which contains tables of data and text that summarizes this data can be divided into two document sections: one document section can contain the descriptive text and have portrait orientation, while the other document section with the tables of data can have landscape orientation. For each document section, the whole range of page properties (see screenshot below) can be defined. Additionally, each document section can also have different headers and footers.

 

WinPropsPageLayout

 

When an SPS is created, it is created with one document section, called the Initial Document Section. This document section is the first document section of the document (whether a single-sectioned or multiple-sectioned document) and cannot be deleted. Initial Document Section properties include properties and styles for the entire document; these are described in the subsection, Initial Document Section.

 

Note:When a large document is processed by FOP (Apache's FO processor), data in memory is discarded each time a new document section is processed. If you wish to reduce memory use, therefore, it is best to structure your document into multiple document sections.

 

Inserting document sections

To add a new document section, do the following:

 

1.Place the cursor at the location in the document where you want the new document section to start.

2.In the context menu (right-click), select Insert Page / Column / Document Section | New Document Section. Alternatively, select this command from the Insert menu. A new document section will be inserted in the design and is indicated by a document section title bar (see screenshot below; the Hide/Show Headers/Footers hyperlink shown in the screenshot below appears after a Header or Footer has been added to a document section). In the output, a new document section will start on a new page.

 

SectionBreak

 

3.The new document section will have the page layout properties that were assigned to the Initial Document Section at the time the new document section was created. These page layout properties for the document section can be edited via the Edit Properties hyperlink of the Document Section. If required, separate headers and footers can be added for the document section (via the Add Header/Footer hyperlink). How to define page layout properties and headers and footers are described in the respective subsections of this section. When a header or footer is added, it is shown in the design within that document section. The display of headers and footers in the design can be toggled on and off with the Hide/Show Headers/Footers hyperlink; this hyperlink appears after a Header or Footer has been added to a document section.

4.If you wish to create a new page for the section immediately after the Initial Document Section, go to the page layout definitions of the Initial Document Section and give the Render a Section Break property a value of Yes. This starts the first non Initial Document Section on a new page. Note the converse effect also, that is, when the property has a value of No. In this case, the first non Initial Document Section starts directly after the Initial Document Section, without rendering a page break. This is useful if the Initial Document Setting is blank—for example, if it contains only design processing templates that produce no output. A property value of No ensures that the first page of the print output document will not be blank (which would have been the case if a blank page with a break after it were to be rendered for the Initial Document Section).

 

Notes

Note the following points:

 

In the PDF and RTF output generated by XSLT 1.0 SPSs, only document sections that are immediate children of the Main Template are allowed. Document sections created inside conditional templates, other templates, or at any level other than that of child of the Main Template, will create only a page break in the PDF output. This restriction does not apply to PDF and RTF output generated by XSLT 2.0 or XSLT 3.0 SPSs.

In the output document, every document section starts on a new page.

Page margin properties are also applied to the HTML page.

When multiple document sections are present in a design, values of the mirror margins property and the associated margin-left and margin-right properties are taken from the initial document section. The values of these properties in subsequent document sections are ignored.

 

Deleting a document section

To delete a document section, in the title bar of the document section, right-click the words Document Section, and in the menu that pops up select the command Edit | Delete. The document section will be deleted, and this will be indicated by the deletion of the title bar. By deleting the document section you will be deleting the page layout properties and headers and footers created for the document section. The content of the document section, however, will not be deleted.

 

© 2017-2023 Altova GmbH