Publishing Style Sheets
The heart of data publishing in CatBase are the Publishing Style Sheets. These tell CatBase:
- What data to publish
- How to sort it
- How to format it
Following is an example showing how CatBase simplifies the database publishing job. We've set up an example database that contains information about photographers and some of their photos that we sell through our (ficticious) stock photo agency.
Publishing a Telephone Directory
For this example we are going to create a telephone directory listing all our Photographers. Some of them have paid to have their entries formatted in certain ways - e.g., in bold, or with an extended listing that includes their address and specialty; those that haven't will just get a plain listing.
Step One: Set up a Publishing Style Sheet
The Publishing Style Sheet we are using for this project is called Telephone Directory (to view or edit Publishing Style Sheets, choose Publishing Style Sheets from the Publishing menu). It looks like this:
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. In this example, we've set up one Paragraph for each different formatting style. When the data is transferred to QuarkXPress or InDesign, CatBase will decide how to format each photographer's details depending upon which Listing Level he has selected (Plain, Bold, Boxed, or Extended).
Elements are the building block of Paragraphs; each Paragraph can contain any number of Elements. There are seven element types:
- Data from a field in the database (First Name, for example)
- Static text (such as "Specialty: ")
- 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, and vice versa).
A quick look at the Plain Entry paragraph (double-click on it in the list of Paragraphs) shows us that it is comprised of six elements:
As you can see, the first Element is a Formula which reads "If Listing Level equals Basic then Include this Paragraph otherwise don't include this paragraph". Each Paragraph in this Publishing Style Sheet contains a similar Element, and this is what controls how each photographer's entry will be formatted. The Formulas are created using a simple point-and-click interface - this is how the one shown here looks:
.
The detailed workings of Publishing Style Sheets are covered in a separate Tutorial.
Step Two: Select the data you want to publish
We're going to include all the Photographers in this directory. Simply click on the Find Data button on the mainwindow, slect Photographers from the pop-up menu, and then click on View All Recordswhen the Search Dialogue appears.
Step Three: Transfer the data
With the list of Photographers displayed, click on the Publish button at the top of the window, then select the Publishing Style Sheet you want to use (Telephone Directory in this case), and hit the Save button to create the transfer file.
Step Four: Import the transfer file into your Quark or InDesign template
Note: We use the Xtags Xtension for importing the file into a QuarkXPress or InDesign document, as this facilitates the creation of text and picture boxes. We have included a demo version of Xtags with our demo (you'll find it in the 3rd Party Demos folder).
Open up your template, or create a new two-column document in Quark or InDesign. We have included a simple template in the Goodies folder with the CatBase demo. If you create a new document, be sure to save it into your CatBase folder before importing the file.
Now for the fun part ...
- With your document open, make sure that the insertion point is in the first text box.
- Choose Get Text with Xtags ... from the File menu (if it isn't there, that means you haven't installed Xtags in your plugins folder!)
- Select the file you just created.
- Make sure that the Include style sheets check box is checked
- Click on the Open button
Watch in amazement as the directory is created before your very eyes! It should look like this:
Mohammed, John, and Mike have paid for a Bold listing.
Ferdinand and Kate have a plain listing.
Sheila has paid for a Boxed listing.
Jenny has an Extended listing.
... and it was all formatted automatically!
It really is that simple!
For additional publishing examples, please see:
Publishing a Catalogue with Quark
Publishing a Catalogue with InDesign
What do do next ...
Download a fully functional Demo and try it for yourself
Contact us if you have any questions
Make an appointment for a LIVE demonstration (no matter where you are)!


. 