XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.

advertisement

PDF Presentations Using AxPoint

PDF Presentations Using AxPoint

June 19, 2002

Editor's Note: Kip Hampton will be presenting a tutorial on Perl and XML at the upcoming O'Reilly Open Source Convention.

Introduction

Conference season is upon us and it's time once again for Perl lovers throughout the world to come together in a spirit of sobriety and good citizenship to share information about the ins and outs of using their favorite language. (Okay, at least the information-sharing and favorite language parts are true...)

All kidding aside, if you've ever attended The Perl Conference or one of the YAPC gatherings, you've probably experienced the vague sense of disappointment that comes from watching someone who's otherwise staunchly committed to Open Source software boot up proprietary OS to use a presentation application to deliver the slides for their talk. It doesn't have to be that way; there are alternatives.

This month, we will be examining AxPoint, Matt Sergeant's Perl/XML-based tool for creating visually rich presentations and slideshows in PDF.

Originally designed for use exclusively within the AxKit XML publishing environment, AxPoint has recently undergone a major facelift and is now also available outside of AxKit as a simple SAX Handler, XML::Handler::AxPoint.

First, let's have a look at AxPoint's XML syntax.

Basic AxPoint Syntax

AxPoint's XML application grammar was designed to be very simple. And it is. Most of the low-level details of how the data will be rendered as PDF (placement of text and images on the slides, etc) are taken care of invisibly, freeing the author to focus on the content of the presentation.

Here is a list of the most common elements in the AxPoint language:

<slideshow>
The required root-level element for all AxPoint presentations

Parents: None

Children: slideset, slide, title, metadata.

<slide>
This element defines the boundaries for a single slide in the presentation.

Parents: slideshow, slideset.

Children: image, point, source-code, title. .

<slideset>
A logical grouping of one or more <slide> elements.

Parents: slideshow, slideset, slide.

Children: None.

<point>
A single bullet-point contained in a <slide>.

Parents: slideshow, slideset, slide.

Children: None.

<source-code> (or <source_code>)
A block of text rendered in a fixed-sized font, equivalent to the <pre> element in HTML.

Parents: slideshow, slideset, slide.

Children: None.

<title>
Defines the title for the immediate parent element.

Parents: slideshow, slideset, slide.

Children: None.

<image>
Inserts an image into current slide.

Parents: slideshow, slideset, slide.

Children: None.

<b> and <i>
Renders the enclosed text in either a bold or italic typeface (same as HTML).

Parents: point, source-code.

Children: None.

<color> (or <colour>)
Renders the enclosed text in a specific color. To choose the color, you can pass one of the 16 HTML named colors to the name attribute, or you can use the rgb attribute and pass in a hex triplet.

Parents: point, source-code.

Children: None.

<metadata>
A child of the <slideshow> element, this element may contain a number of child elements that describe the metadata for the slideshow.

Parents: slideshow.

Children:

  • speaker -- The speaker's name; appears on the title slide.
  • email -- The speaker's email address. If present, it makes the speaker's name appears as a mailto: link on the title slide.
  • organisation -- The speaker's company or affiliation.
  • link -- A URL. If present, it makes the organisation name appear as a hyperlink to that URL on the title slide.
  • background -- The path to an image to be used as the background for all slides in the presentation. The image size is fixed at 612 x 450.
  • logo -- The path to a logo or other image that will appear in the lower right corner of each slide.
.

Pages: 1, 2

Next Pagearrow