Getting started with other XML

TopLeaf can be used to format any well-formed XML content. The XML does not need to be valid with respect to a DTD or schema.

The following will guide you through the process of creating an initial stylesheet from some content. It assumes that the content is available on the local file system. If your content is stored in a content management system you will need to extract a copy to the file system. If it refers to other resources (such as images) make sure these are copied as well.

Select File » Open... to display the Open dialog.

Select the top-level item as shown above and press the New button. The New Level dialog will appear.

Enter a name and make sure that the Level is a publication box is checked. In TopLeaf terminology a publication stores the information associated with a stylesheet, so you will need to create a separate publication for each stylesheet you create.

When you press OK you will see the following dialog:

A publication contains one or more partitions, each defining its own content. By convention the first partition is called Template, but you may enter any appropriate name. Enter the path to the source document file. If your content consists of multiple files, select the “main” file that refers to all of the others. Press Next to continue.

You can use the default values on the Publication Options dialog. TopLeaf will examine your source document and try to guess the type of table markup used. If you are unsure of the correct model to use, select Unknown. The publication options for your stylesheet can be changed later if necessary.

[Note] Note

By default TopLeaf examines the source document and tries to create an appropriate set of initial mappings. If you have a CSS stylesheet for formatting your XML you may get a better result by choosing Import from a CSS file.

After you press Finish the new partition is selected in the Open dialog. Press the Open button to open the partition and start working with it.

Select Commands » Compose to render the document using the default layout and the initial mappings. See Typesetting concepts for information on how you can change the appearance of the rendered output.