"Catbase has enabled us to complete projects at a fraction of both the cost and the time of doing so without the Catbase software. In addition the support that the Catbase team have given us has been superb"

– Chalvington Press

Publishing a Catalog with InDesign using XML

If you've got some data in a spreadsheet, database, Word document ... or other format, and you need to publish it in the form of a catalogue, directory, price list, yearbook, illustrated report, or just about any other format, CatBase could be the answer to your prayers.

Database publishing simplified!

CatBase makes it easy to publish your catalogue using InDesign. It does all the hard, boring work for you! The process, in a nutshell, goes like this:

  1. Get your data into the CatBase database. You can either enter it manually, import a delimited text file, or (Data Chameleon Edition) extract it from a MySql or ODBC-compliant database or spreadsheet (such as Microsoft SqlServer, MySQL, Access, etc.)
  2. Set up Publishing Style Sheets in the CatBase database. These tell CatBase what data you want to publish and how you want it sorted and formatted. You can have any number of Publishing Style Sheets, so you can publish your data in lots of different ways (and to various publishing destinations).
  3. Define a Set of records (for example, all records in the table; all people in Arizona; all products in a certain category; or all new products, etc.).
  4. Define a Publishing Project, which describes which Set of data to publish, which Publishing Style Sheet to format it with, and where to save the resulting file.
  5. Click on the Publish Data button on the main window to publish the data.
  6. Import the resulting file into your InDesign template. All the text is - magically - formatted exactly as you want it to be, with pictures included if appropriate!

OK then, let's see just how easy it is!

Click here to see a brief movie, or read on to read about the process in more detail.

Publishing a Catalog with InDesign using XML

For the purposes of this Tutorial, we are using the Demo Database that is supplied with the CatBase Demo. If you would like to try it for yourself, you can download the fully-functional Demo from here.

Publish a Catalogue with Pictures

For this example we are going to create a catalog that shows photographs offered for sale by our fictitious stock photo agency, Castlephotos. The photos are organised into Categories; the Categories are sorted in alphabetical order with the appropriate photos listed under each one, also sorted alphabetically by name. For each picture we will include the following data:

  • The picture name
  • The picture itself
  • A description
  • The name of the photographer
  • Prices

We'll start by showing you how easy it is to publish the catalogue, and then we will look in a little more detail about how this is accomplished.

Step One: Publish the data

On the main window, click on the Publish Data button and choose XML Catalogue from the pop-up menu. The data is published and saved to a file called XML-Catalogue.xml, which you'll find in a folder called Data Exports on your desktop.

Step Two: Import the XML file into your InDesign template

Open up your InDesign template, or create a new document with a two-column Master Text Frame. We have included a sample catalogue template with the CatBase demo: it's called catalog.idd and you will find it in the Goodies folder.

Now for the fun part ...

  • Move the file (XML-Catalogue.xml) from the Data Exports folder into your CatBase folder (if you skip this step, it won't be able to find the pictures).
  • With your InDesign document open, make sure that the insertion point is in the first text box.
  • Choose Import XML ... from the File menu
  • Select the file you just created.
  • Click on the Open button

Watch in amazement as the catalogue is created before your very eyes! It should look like this:

catalog

  • (If yours doesn't look like this, that is probably becasue you had not clicked in the text box prior to importing the file. In that event, simply drag an element from the Structure into the text area - see the next item.)
  • The XML structure is displayed in the Structure panel to the left of the screen. If you expand some of the XML elements, the structure looks like this:
xml structure

Listings is the root element.

category1 is the top-level category (Animals, in this example)

picture is the picture that will be used for the category name.

category2 is the second-level category (a sub-category under Animals - Birds, for example)

Pictures are the selection of Picture records that belong under each sub-category

record is an individual Picture record.

Now to create the catalogue, if it was not created when you imported the file, simply drag an element from the XML list onto the document layout. You can place individual elements, or create the entire catalog in one go by dragging the category1 element to the document layout.

It really is that simple!

Note: In our InDesign catalog document, we have set up Style Sheets and mapped them to the XML elements, so that the text will be automatically formatted as the XML data is placed. If you have created a new InDesign document for your catalogue, you will need to create style sheets and then map them to the XML elements (to do this, choose Map Tags to Styles from the flyout Structure menu in the Structure pane).

Ok, let's take a brief look at how it all works:

Step One: Set up a Publishing Style Sheet

Publishing Style Sheets tell CatBase:

The Publishing Style Sheet we are using for this project is called Picture Catalogue by Category (to view or edit Publishing Style Sheets, click on the Style Sheets button on the main window and choose Publishing Style Sheets from the pop-up menu). It looks like this:

publishing style sheet

Note that the Default Publishing Destination is QuarkXPress; that's OK - we will simply choose XML instead when we publish the data.

Perhaps the most important thing here is the list of Paragraphs. This is where we specify exactly what data is going to be published and how it will be formatted. For example, the first paragraph will be the picture name. Paragraphs can contain any number of elements; there are seven element types:

Elements are the building blocks of paragraphs.

A quick look at the Prices paragraph (double-click on it in the list of Paragraphs) shows us that it is comprised of four elements:

elements

Click on the Preferences tab at the top of the Paragraph window to see the XML options that have been selected:

xml preferences

How you use these options depends on what destination you have planned for the XML file: if it's going, for example, to be used to display data on a web site, then you would probably select the Each paragraph element is an XML element option.

The detailed workings of Publishing Style Sheets are covered in a separate Tutorial.

Step Two: Select the data you want to publish

Since, for this example, our data is sorted by Category, we've created a Set called All Categories.(See more info about Sets here.)

Step Four: Set up a Publishing Project

You don't have to set up a Publishing Project, but doing so does simplify your job! You won't have to remember which set of data to use, or which Publishing Style Sheet, to create a particular publication in the future. We've set one up called XML Catalogue: here's how it looks:

xml publishing project

Step Five: Publish the data

Click on the Publish Data button on the main window and publish the data as described at the beginning of this Tutorial.

CatBase offers lots of different formatting options!

The example shown here is just one way that CatBase can publish your data. You're in complete control:

What do do next ...

About Us | Site Map | Privacy Policy | Contact Us | ©2008 CatBase Software Ltd.