View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Matt Sergeant > Pod-SAX > pod2axpoint.xsl


Annotate this POD


New  3
Open  1
View/Report Bugs

pod2axpoint.xsl ^


pod2axpoint.xsl - Stylesheet to convert XMLified POD to AxPoint format


Use Perl to generate XML from POD:

  use XML::SAX::Writer;
  use Pod::SAX;
  my $source = shift(@ARGV) or die;
  my $output = shift (@ARGV) || \*STDOUT;
  my $p = Pod::SAX->new({Handler => XML::SAX::Writer->new()});

No perl needed to transform the result to axpoint:

  xsltproc pod2axpoint.xsl foo.pod.xml > foo.axp

Finally transform that with the axpoint script to PDF:

  axpoint foo.axp foo.pdf


Pod is convenient to write markup.

AxPoint is a powerful, prominent presentation markup.

This XSLT stylesheet attempts to close the gap between POD and AxPoint.

It is meant only for a subset of POD, not all of it. The idea is to let you write presentations in POD to convert to axpoint format, not to convert any POD document to a presentation. Actually, it fails on a broad variety of real world POD documents.

It is also meant only for a subset of AxPoint. The transition attribute for the title, slide, and point element are not accessible through POD directives. Nor is the metadata section or the image, colour, table, rect, circle, ellipse, line, and text elements. To make these options available, it is necessary to edit the stylesheet itself.


You are expected to edit pod2axpoint.xsl to contain the speaker, organisation, etc., maybe a background image, or other metadata.


A =head1 in the POD starts a new slide and sets the title. The very first =head1 sets the headline on the title page. Anything between the first and the second =head1 is ignored. Edit the stylesheet metadata section to fill the titlepage. Every paragraph is a point. There are other ways to generate points too:

This is the content of a head2 tag

This is the content of a head3 tag

An item after an over 4

And a paragraph within this item. As a paragraph is a point itself, we enter recursion here and the point gets a deeper level.

Another item, the last one on this slide

DEMO (cont'd) ^

A paragraph with bold text, italic text, some $code+@code, all of them produced with the POD inline tags. The next paragraph is indented POD, so that it must be rendered as source code:

    sub foo { @{[[1,2]]} };
    my ($one,$two) = @{foo()};
    # my ($list) = foo(); my ($one,$two) = @$list;
    print "1[$one] 2[$two]\n";

And this is the third (and last) paragraph on this slide.

DEMO (cont'd) ^

Enjoy nesting (the item)

Enjoy nesting (the paragraph)

Enjoy nesting next level (the item)

Enjoy nesting next level (the paragraph)

Enjoy nesting 3rd (the item)

Enjoy nesting 3rd (the paragraph)

This Manpage as Slideshow ^

In the root directory of the Pod::SAX distribution, run

    make pdf

and all conversions will happen, finally acroread will be called to display the slideshow.

syntax highlighting: