How the publishing parser works
   compleat botanica    using the software    Publishing   
 
 
   

 

The step-by-step publishing process is all you need to know in order to produce great looking labels, abstracts, Web pages, pre-press books, and more.  But if you're familiar with HTML you can customize every aspect of your final publication.  This page describes how.

At the heart of The Compleat Botanica publishing process is the parser.  The parser's role is to take HTML templates, to replace special keyword tags with data from the database, and to create new HTML documents with the user's selected style sheets.  Conceptually there are three inputs and one output to the process.  It looks like this:

Input 1:  Current filter

The first of the three inputs to the parser is the currently selected filter.  This determines which records to publish and in some cases also determines which columns to publish.  Use the usual process for defining and selecting a filter to show only the records and columns that you want to publish.

Input 2:  Style sheets

The second of the three inputs are the style sheets.  Each published document references three style sheets:  cbs-colorscheme.css, cbs-fontface.css, and cbs-pointsize.css.  When the user selects a color scheme using the step-by-step process, the publish parser copies the selected scheme to the well-known filename "cbs-colorscheme.css" in the publication directory.  Similarly, the selected font style is copied to "cbs-fontface.css" and the selected point size is copied to "cbs-pointsize.css".

Although it is not actually a style sheet, the selected logo is pre-processed the same way as the other three style sheets: the selected logo file is copied to the well-known name "images/logo.gif" in the publication directory.
The source files for the three types of style sheets and the logo files can be found under the "Publish Templates" directory.  By modifying any of the pre-defined style sheets you can customize the overall appearance of the documents created.  See the document on Publication style sheets for more about this.

You can also create your own style sheets by copying an existing one and saving it to one of the three style sheet subdirectories.  New style sheets created by you are dynamically added to the step-by-step user-interface the next time you start a publish process.

Adding a logo file to the "Logos" directory is just a simple.  Logo files must be in GIF format and have a GIF filename extension.  For best results pay attention to the transparency settings of your logo file to prevent mismatched backgrounds.  Logo files can have any dimensions.  The standard templates will automatically shrink or expand your logo in some cases.  If you are creating your own template files, there are no artificial restrictions placed on the size of your logo.

Input 3:  Templates

The last of the three inputs to the parser are the two template files:  one each from the "Detailed Pages" directory and the "Summary Tables" directory.  These templates contain embedded keyword tags that are replaced with data from the database.  For example, for the sample diagram shown above, the tag <cb:BotanicalName> would be replaced with "Wisteria floribunda 'Texas Purple'" for the first document, then "Cornus kousa var. chinensis" for the second document, and so on.  In addition to replacement tags for data fields, there are special processing tags like <cb:Prev> and <cb:Next> which are replaced with hyperlinks to the previous and next documents in the publication list.  For details about these replacement tags see Publication template replacement tags.

All other aspects of a template file may be freely modified.  For example, to insert header and footer information that you want to appear on each page, simply edit the template file using your favorite HTML editor.

See also

   Step-by-step guide to publishing

   The publish previewer

   Publication style sheets

   Publication template replacement tags

   Publishing your data

Last reviewed March 25, 2004   

 

  Order your copy here