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:
- Get
your data into the CatBase database. You can either enter it manually,
import a delimited text file, XML file, or (Data
Chameleon Edition) extract it from a MySql or ODBC-compliant
database or spreadsheet (such as Microsoft SqlServer, MySQL, Access, etc.)
- 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).
- 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.).
- 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.
- Click on the Publish Data button on the main window to publish the data.
- 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!
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:

- (If yours doesn't look like this, that is probably because 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:
 |
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:
- What data to publish
- How to sort it
- How to format it
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:

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:
- Data from a field in the database (Picture Name,
for example)
- Static text (such as "Price, framed: ")
- A formula. Formulas are a very versatile tool which
enable you to tell CatBase how to make decisions about what to include
- or leave out - and, optionally, how to format it.
- Punctuation (such as a tab character)
- A calculation (for example, you could discount all
prices by 15% for a sale catalogue)
- A picture
- A relation (relations enable you to include information
from a related table. In our example, the Pictures table is related
to the Photographers table so when we are publishing Pictures, we
can easily include information about the photographer who owns each
picture).
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:

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

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:
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.
Is XML the best option for database publishing?
It certainly is quite easy to do, but it does have some limitations. For example, you have very little control over the placement and formatting of images, and you cannot take advantage of plugins such as Xtags (which makes it possible to create anchored and unanchored text and picture boxes) and InCatalog, which enables "round-tripping". You might like to take a look at another example of publishing a catalogue with InDesign or Quark, which uses tagged text instead of XML.
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:
- Define your own tables and fields using the Table and Field Setup option (click on the Setup button on the main window).
- Design your data entry forms using the Form Design Wizard (click on the Setup button on the main window)
- Import data from practically any source
- Publish your data in many different styles: as a catalogue with or without pictures, a directory, price list, and so on.
- Publish your data to various publishing destinations: InDesign, QuarkXPress, FrameMaker, XML, HTML, delimited text files, RTF, Excel ...
- Create reports on your data
- Send emails and letters if you have contact details in your database
- ... and lots of other things!
What do do next ...