Get Started

This chapter describes the concepts of associating XML data to layout elements in a report template. It describes basic techniques as well as advanced techniques for creating complex and highly conditionalized report formats.

If you are using Microsoft Word to create RTF templates, then see Create RTF Templates Using the Template Builder for Word before reading this chapter. The demos and samples provided in the Template Builder installation can help orient you to the process of creating templates in Microsoft Word.

You don't need Microsoft Word or the Template Builder to create RTF templates and this chapter describes how to add components without using the Template Builder. Many of the layout components described in this chapter can also be inserted in a template using the Template Builder.

This section covers the following topics:

What Are RTF Templates?

Rich Text Format (RTF) is a specification used by common word processing applications, such as Microsoft Word.

When you save a document, RTF is a file type option.

Publisher converts documents saved as the RTF file type to XSL-FO enabling you to create report layouts using many standard word processor features.

During design time, you add data fields and other markup to the template using Publisher's simplified tags for XSL expressions. These tags associate the XML report data to the report layout and include other processing instructions.

In addition to the word processor's formatting features, Publisher supports other advanced reporting features such as conditional formatting, dynamic data columns, running totals, and charts.

If you are familiar with XSL and prefer not to use the simplified tags, Publisher also supports the use of pure XSL elements in the template. If you want to include code directly in the template, then you can include any XSL element, many FO elements, and a set of SQL expressions that Publisher extends.

Prerequisites for Designing Templates

You must perform these tasks before designing a template.

Before you design a template, you must:

  • Know the business rules that apply to the data from the source report.

  • Generate sample data from the report data model.

    Be familiar with the formatting features of Microsoft Word.

What is XSLT Compatibility?

Publisher uses the XSLT processor provided by Oracle XDK 11.1.0.7.0, which supports the W3C XSL Transformations 1.0 recommendation.

The processor also implements the current working drafts of the XSLT and XPath 2.0 standards.

By default, Publisher is compatible with XSLT 1.0. If you want to use XSLT and XPath 2.0 features in the template, then you must disable XSLT 1.0 compatibility. This configuration is performed at the template level. The template-level setting overrides the server setting.

XSLT compatibility is set as a Build Option in the Template Builder for Word. See Set UI Options.

Key Concepts

When you design the template layout, you must understand how to associate the XML input file to the layout.

This chapter presents a sample template layout with its input XML file to illustrate how to make the proper associations to add the markup tags to the template.

Design the Template Layout

Use the word processor's formatting features to create the design.

For example:

  • Select the size, font, and alignment of text

  • Insert bullets and numbering

  • Draw borders around paragraphs

  • Include a watermark

  • Include images (jpg, gif, or png)

  • Use table auto formatting features

  • Insert a header and footer

About Adding Publisher Code

When you create an RTF template, you add Publisher code to the RTF document. Follow one of these methods to add code.

Publisher supports the following methods for adding code:

  • Basic RTF Method

    Use any word processor that supports RTF version 1.6 writer (or later) to design a template using Publisher's simplified syntax.

  • Form Field Method

    Using Microsoft Word's form field feature allows you to place the syntax in hidden form fields, rather than directly into the design of the template.

    If you use XSL or XSL-FO code rather than the simplified syntax, then you must use the form field method.

This chapter describes how to create RTF templates using the preceding methods.

If you are using Microsoft Word, you can use the Publisher Template Builder for Word to facilitate inserting Publisher code fields.