DocBook Slides For Keynote

Zveno has developed a XSL stylesheet to transform DocBook slide format into an Apple Keynote presentation. Keynote is Apple's presentation application for Mac OS X.

An interesting feature of Keynote is that its underlying file format is XML. This means that presentations can be generated, as any XML document can be generated, using a XSL transformation. Apple has released technical notes on the XML format for Keynote (tech note 2067) and bundle architecture (tech note 2073). Please ensure that you are using Keynote version 1.1.1 (or later).

Follow these steps to create a Keynote presentation from a DocBook Slide document:

  1. Download the DocBook Slide XSL stylesheets. Unpack the distribution into the directory of your choice.

  2. Download the DocBook Slide Keynote XSL stylesheet distribution. Unpack this distribution in the xsl directory of the DocBook Slide XSl stylesheet directory.

    This creates a directory called keynote containing the stylesheet default.xsl.

  3. Using Keynote, create a blank presentation with your desired theme.

    Any slides that you create in this presentation will be replaced by your DocBook slides. So while it may be useful to create slides to test your slide masters, these slides will not appear in the final presentation.

  4. Add these slide masters:

    Title & Subtitle

    This is used for the slideshow title.

    Title - Center

    This is used for the title of each foilgroup.

    Title - Top

    This is used for overview foils.

    SmlTitle & Bullets

    This is used for foils that only contain bullet points.

    Title & Bullets - Left

    This is used where a foil has bullets and an image.

    SmlTitle

    This is used where only a title is displayed.

    The XSL stylesheet can be customised to use different slide masters.

  5. Save the presentation and close the document.

  6. In the Finder, select your presentation and Control-Click. This brings up a menu. Choose "Show Package Contents". This will bring up a separate Finder window that displays the components of the presentation bundle.

  7. The most important file is presentation.apxl. This file is the XML document that controls the presentation theme, layout and content. Make a copy of this file and call the copy, say, presentation.orig

  8. The file presentation.orig must be modified slightly for it to work correctly with the XSL transformation. Open the file in a text editor and change the XML Namespace URI for the plugin prefix to http://developer.apple.com/schemas/APXL-Plugin (ie. just add "-Plugin"). The line should now read as follows:

    <presentation xmlns="http://developer.apple.com/schemas/APXL" version="36" xmlns:plugin="http://developer.apple.com/schemas/APXL-Plugin">
    
  9. Now use your favourite XSLT tool to transform your slide document. Make the copied presentation document from above (presentation.orig) the source document. Use the stylesheet keynote/default.xsl that you downloaded. Specify the pathname to your slide document as the slides parameter. Save the result as presentation.apxl.

    You can use the tkxsltproc application to do the work.

    For the brave-of-heart just use the Terminal:


    cd ~/Documents/my-presentation.key
    xsltproc -o presentation.apxl --stringparam slides ~/slides.xml presentation.orig

  10. That's it! Open the presentation in Keynote and your slide document will now be the content of the Keynote presentation.

There are some considerations when producing slides using Keynote:

  • Keynote does not support SVG, so any SVG diagrams must be converted to PNG format (or JPEG, GIF). We use Batik for this purpose.

  • The Keynote XSL stylesheet does (yet) support slide transitions on a per-slide basis. Slide transitions specified for a master slide should work OK. NB. It isn't difficult to specify transitions in the APXL language, but the DocBook Slide schema has no provision for this feature.

  • Thumbnails are not generated for each slide. Instead the thumbnail for the first slide will be used for all slides.

  • The Keynote XSL stylesheet is a work-in-progress. Layout of slide content is far from perfect, and not all DocBook Slide features are supported. Please contact Zveno to report bugs.


Copyright © 1998-2003 Zveno Pty Ltd. All rights reserved. ABN 64 074 383 163. Legal notices. Comments or questions about this website? Contact the Zveno webperson.