Converting RecipeBook XML to Other Formats

One of the best features of RecipeBook XML is that it allows people to store and distribute recipes in a variety of popular electronic formats. A single RecipeBook XML source document can easily be converted to HTML, PDF or Rich Text documents. This tutorial describes how to use XMLMind's FO Converter (XFC) to transform RecipeBook XML into the format of your choice.

Operating System Requirements

XFC is Java-based and will run on almost any platform that supports Sun Java version 1.4 or better. This means you can transform your RecipeBook XML recipes using Windows, Linux or Mac OS. If your computer does not have Java installed you will need to visit http://java.sun.com and download the J2SE Java Runtime Environment (JRE) for your operating system.

Downloading The Converter

The personal edition of XMLMind's FO Converter is available as a free download and comes with a very liberal end-user license. You can find XFC on XMLMind's product page at: http://www.xmlmind.com/products.html. If you have not already downloaded XMLMind's XML Editor (XXE) you may wish to do so at this time.

Installing XMLMind's FO Converter

Using the Windows setup binary is very easy and can be accomplished quickly by accepting the default directory locations. Other operating systems require using the tar+gzip archive which takes a few more steps.

To install using the tar+gzip archive.

  1. Decide on a suitable location to install. For example, /usr/local.
  2. Extract the archive to the chosen directory.
  3. Create an application launcher on your desktop that points to the xslutility shell script.

Which ever method of installation you decide on, make sure that you are logged in as a user with sufficient privileges to accomplish the task.

Configuring XFC To Handle RecipeBook XML

The FO Converter needs the RecipeBook XML style sheets to convert recipes to other formats. Style sheets can be obtained from the RecipeBook XML web site.

Follow these steps to install style sheets for RecipeBook XML.

  1. Download the RecipeBook XFC style sheet package.
  2. Locate the directory of the XFC installation. For example /usr/local/xfc-22 or C:\Program Files\XMLmind_FO_Converter.
  3. Extract the RecipeBook XXE configuration package into the <xfc-root>/xslu/config/ directory where <xfc-root> refers to the directory located in the previous step.
  4. Verify that the <xfc-root>/xslu/config/recipebook/ directory exists and contains all of the files from the package.

XFC must be configured after installing the style sheets.

  1. Launch XFC.
  2. Create a new transformation by clicking New... within XFC's Transformation field.
  3. Give a description of "RecipeBook XML to HTML".
  4. Click on the folder icon and browse to the file <xfc-root>/xslu/config/recipebook/recipebook.xsl
  5. Click OK.
  6. Create a new transformation, but this time make the description "RecipeBook XML to RTF".
  7. Browse to the file recipebook-fo.xsl in the same directory as recipebook.xsl.
  8. Click on the radio button for XFC in the FO Processor field and click OK.
  9. Create a "RecipeBook XML to PDF" transformation and again select the recipebook-fo.xsl file.
  10. This time click on the radio button for FOP in the FO Processor field before clicking OK.

You are now ready to use XFC to transform your RecipeBook XML recipes.

Converting A RecipeBook XML Recipe

Converting recipes is easy once you are familiar with XFC. A short step-by-step example is given below.

  1. Download one of the RecipeBook XML recipes from happy-monkey.net's recipe collection.
  2. Launch XFC.
  3. Browse for the RecipeBook XML file by clicking on the folder icon within the Input section of XFC's application window.
  4. Choose a conversion using the drop-down list in the Transformation section of XFC.
  5. Select a destination directory using the browse feature in the Output section.
  6. Click on the Convert button.
  7. The progress bar and console messages will indicate when the conversion is complete.

Use the XFC help feature and product documentation to learn more about how to use the XMLMind FO Converter.

Viewing The Completed RecipeBook XML Recipe

Open the finished document with the appropriate application as listed below.

All copyrights and trademarks are property of their respective owners. Naming of particular products or brands should not be seen as endorsements.