If you're looking for a way to just display POD on a web page, here's a 
provider I wrote which does it.... It just uses Pod::XML to fetch a .pm file 
as XML, at that point you can do whatever you want, such as use the 
pod2axpoint.xsl.to make AxPoint, or just convert it to HTML, which takes 
about 10 mins of XSLT programming. 

There are some problems with the Pod::XML format though. The way it 
structures links is inconsistent, and in fact pretty much useless at that. 
Anyway, have fun with this... 


On Friday 25 October 2002 08:57 am, Andreas J. Koenig wrote:
> >>>>> On Fri, 25 Oct 2002 14:00:00 +0200, Robin Berjon
> >>>>> <[EMAIL PROTECTED]> said:
>   >
>   > IIRC it's not a bug in AxPoint, just a missing feature :) However, if
>   > Pod::SAX produces that then it has a bug because it doesn't follow the
>   > AxPoint spec.
>
> Thanks, Robin, for the tricky answer:-)
>
> Pod::SAX doesn't produce AxPoint, it produces stuff like
>
> <pod>
>   ...
>   <itemizedlist>
>     <listitem>
>       <para>
>
>
> which can be converted further by pod2axpoint.xsl (which comes with
> Pod::SAX). This, in turn, produces something like
>
> <slideshow>
>   ...
>   <slide>
>     ...
>     <point>
>       <point>
>
> So, if I understand correctly, the bug is in pod2axpoint.xsl. I'll try
> to work around that. Unfortunately, my XSLT skills are not up to fixing.
package GEB::PodProvider;
use strict;
use vars qw/@ISA/;
@ISA = ('Apache::AxKit::Provider::File');

use Apache;
use Apache::Log;
use Apache::AxKit::Exception;
use Apache::AxKit::Provider;
use Apache::AxKit::Provider::File;
use Apache::Constants;
use Pod::XML;

# We are just going to provide POD to people as XML, otherwise we handle things just 
like a File Provider does...

sub get_strref {
    my $self = shift;
        if ($self->_is_dir()) {
        throw Apache::AxKit::Exception::IO(
          -text => "$self->{file} is a directory - please overload File provider and 
use AxContentProvider option");
    }
    my $fh = $self->SUPER::get_fh();
        my $parser = Pod::XML->new('send_to_string' => 1);
    $parser->parse_from_filehandle($fh);
        my $contents = $parser->{'xml_string'};
    return \$contents;
}

1;
=head1 NAME

PodProvider - An AxKit Provider for POD.

=head1 SYNOPSIS

In your .htaccess file etc.

  AxContentProvider GEB::PodProvider

=head1 DESCRIPTION

This is an AxKit provider which allows you to feed POD files into AxKit as XML. It 
uses the
Pod::XML module to generate the XML, see that module for a description of the 
structure of the
generated XML.

=head1 Author

Tod G. Harter, Copyright 2002, all rights reserved
[EMAIL PROTECTED]
http://www.giantelectronicbrain.com

=head1 License

This code is the proprietary and confidential property of its author and may only be 
used with
explicit permission. If you do not have a license agreement with the author then do 
not use it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to