Why not adopt me?
NAME
Pod::POM::View::DocBook - DocBook XML view of a Pod Object Model
SYNOPSIS
use Pod::POM;
use Pod::POM::View::DocBook;
$parser = Pod::POM->new;
$pom = $parser->parse($file);
$parser->default_view('Pod::POM::View::DocBook')
$pom->present;
# or
$view = Pod::Pom::View::DocBook->new(%options);
$parser->default_view($view)
$pom->present;
# or even
$pom->present(Pod::Pom::View::DocBook->new(%options));
DESCRIPTION
DocBook is a
See http://www.docbook.org/ for details.
This module provides a view for Pod::POM
that outputs the content as a DocBook XML document.
Use it like any other Pod::POM::View
subclass.
If Pod::POM->default_view
is passed this modules class name then when the present
method is called on the Pod object, this constructor will be called without any options. If you want to override the default options then you have to create a view object and pass it to default_view
or on the present
method.
For example to convert a Pod document to a DocBook chapter document (for inclusion in another document), you might use the following code:
$pom = $parser->parse($file);
$view = Pod::Pom::View::DocBook( root => 'chapter' );
print $pom->present($view);
SUBROUTINES/METHODS
Apart from the view_*
methods (see Pod::POM for details), this module supports the two following methods:
- new()
-
Constructor for the view object.
Options:
root
-
name of the root element (default:
article
) topsect
-
name of the topmost sectional element (defaults to
sect1
ifroot
isarticle
orchapter
ifroot
isbook
extractname
-
if true then if the first
=head1
isNAME
then its content is extracted as the title of the root element (default is true) titlecasing
-
if true then title text is converted to initial caps format, i.e. all words are initial capped except for stopwords such as "a", "the", "and", "of", "on", etc (default is enabled)
preservecase
-
list of words for which case should be preserved in titles. The list may be an array ref or a string of words separated by spaces, commas or vertical bar characters.
- view( $type, $node )
-
Return the given Pod::POM node as formatted by the View.
The following methods are specializations of the methods in Pod::POM::View:
- make_ulink
- view_begin
- view_for
- view_head1
- view_head2
- view_head3
- view_head4
- view_item
- view_over
- view_pod
- view_seq_bold
- view_seq_code
- view_seq_entity
- view_seq_file
- view_seq_italic
- view_seq_link
- view_seq_link_transform_path
- view_seq_space
- view_seq_text
- view_textblock
- view_verbatim
- DEBUG
AUTHOR
Andrew Ford, <A.Ford@ford-mason.co.uk>
VERSION
This is version 0.07 of Pod::POM::View::DocBook
.
BUGS AND LIMITATIONS
This is still alpha-level code, many features are not fully implemented.
Please report any bugs or feature requests to bug-pod-pom-view-docbook at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Pod-POM-View-Docbook. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
DEPENDENCIES
This module depends on Pod::POM.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Pod::POM::View::DocBook
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Pod-POM-View-DocBook
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
SEE ALSO
LICENSE AND COPYRIGHT
Copyright 2009 Andrew Ford and Ford & Mason Ltd, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.