The Export/Import Template view for XML

You define and edit templates for export and import in the Export/Import Template view for XML in the Report painter. The view uses a tree view to represent the template.

NoteUsing the Web DataWindow in PowerBuilder If you are both an InfoMaker user and a PowerBuilder Enterprise user, you might be creating reports (nonupdatable DataWindows) in InfoMaker and then using PowerBuilder to work with your DataWindows. For information about using the Web DataWindow and the Export Template view for XHTML to customize the generation of the XML Web DataWindow and the XHTML Web DataWindow, see the chapter on using the Web DataWindow in the DataWindow Programmer's Guide.

When you create a new report, InfoMaker displays a default template in the Export/Import Template view. You can edit only one template at a time in the view, but you can create multiple templates and save them with the report. Each template is uniquely associated with the report open in the painter.

The default template has one element for each column in the report.

The sample shows a default template for a Data Window in the Export slash Import Template view. The template is represented as a tree. At the top level is the Data Window object d _ sales _ rep _ customer _ orders, shown with the tag icon that identifies a root or child element. Indented under this is d _ sales _ rep _ customer _ orders _ row shown also with the tag icon. Indented under this, and shown with tag icons, are id, order _ date, fin _ code _ id, and region. Under each of them, with the icon for a Data Window column reference, are id, order _ date, fin _ code _id, and region.

Creating, opening, and saving templates

From the pop-up menu for the Export/Import Template view (with nothing selected), you can create new templates with or without default contents, open an existing template, save the current template, or delete the current template. You can only open and edit templates that are associated with the current report.

The example shows the pop up menu for the Export slash  Import Template view with the menu items New, New Default, Open, Save, Save As dot dot dot, and Delete.

Representing tree view items

Each item in the template displays as a single tree view item with an image and font color that denotes its type. Elements are represented by a yellow icon that resembles a luggage tag. The end tags of elements and the markup delimiters used in an XML document do not display.

Table 12-1 shows the icons used in the Export/Import Template view.

Table 12-1: Icons used in the Export/Import Template view

Icon

Description

the icon displays the letters X M L

XML declaration or document type declaration

the icon displays a tag labeled tag with a lightly shaded background

Root or child element

the icon displays a tag labeled tag with a darkly shaded background

Group header element

the icon displays dashes in a pattern of three columns and six rows

Report column reference

the icon displays a capital letter A

Static text control reference

the icon displays a plus sign and an equals sign with a forward slash between them

Computed field or InfoMaker expression reference

the icon displays a capital A and a lowercase a in italics

Literal text

the icon displays a cartoon style text bubble

Comment

the icon displays the letter pi

Processing instruction

the icon displays an italic capital A enclosed in square brackets

CDATA section

the icon displays a larg rectangle with a smaller rectangle superimposed on it that points to it with an arrow

Nested report