.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Pod::Xhtml 3pm" .TH Pod::Xhtml 3pm "2016-09-17" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Pod::Xhtml \- Generate well\-formed XHTML documents from POD format documentation .SH "SYNOPSIS" .IX Header "SYNOPSIS" This module inherits from Pod::Parser, hence you can use this familiar interface: .PP .Vb 3 \& use Pod::Xhtml; \& my $parser = new Pod::Xhtml; \& $parser\->parse_from_file( $infile, $outfile ); \& \& # or use filehandles instead \& $parser\->parse_from_filehandle($in_fh, $out_fh); \& \& # or get the XHTML as a scalar \& my $parsertoo = new Pod::Xhtml( StringMode => 1 ); \& $parsertoo\->parse_from_file( $infile, $outfile ); \& my $xhtml = $parsertoo\->asString; \& \& # or get a reference to the XHTML string \& my $xhtmlref = $parsertoo\->asStringRef; \& \& # to parse some other pod file to another output file all you need to do is... \& $parser\->parse_from_file( $anotherinfile, $anotheroutfile ); .Ve .PP There are options specific to Pod::Xhtml that you can pass in at construction time, e.g.: .PP .Vb 1 \& my $parser = new Pod::Xhtml(StringMode => 1, MakeIndex => 0); .Ve .PP See \*(L"\s-1OPTIONS\*(R"\s0. For more information also see Pod::Parser which this module inherits from. .SH "DESCRIPTION" .IX Header "DESCRIPTION" .IP "new Pod::Xhtml( [ \s-1OPTIONS \s0] )" 4 .IX Item "new Pod::Xhtml( [ OPTIONS ] )" Create a new object. Optionally pass in some options in the form \&\f(CW\*(Aqnew Pod::Xhtml( StringMode => 1);\*(Aq\fR .ie n .IP "$parser\->parse_from_file( \s-1INPUTFILE,\s0 [\s-1OUTPUTFILE\s0] )" 4 .el .IP "\f(CW$parser\fR\->parse_from_file( \s-1INPUTFILE,\s0 [\s-1OUTPUTFILE\s0] )" 4 .IX Item "$parser->parse_from_file( INPUTFILE, [OUTPUTFILE] )" Read \s-1POD\s0 from the input file, output to the output file (or \s-1STDOUT\s0 if no file is given). See Pod::Parser docs for more. Note that you can parse multiple files with the same object. All your options will be preserved, as will any text you added with the add*Text methods. .ie n .IP "$parser\->parse_from_filehandle( [\s-1INPUTFILEHANDLE,\s0 [\s-1OUTPUTFILEHANDLE\s0]] )" 4 .el .IP "\f(CW$parser\fR\->parse_from_filehandle( [\s-1INPUTFILEHANDLE,\s0 [\s-1OUTPUTFILEHANDLE\s0]] )" 4 .IX Item "$parser->parse_from_filehandle( [INPUTFILEHANDLE, [OUTPUTFILEHANDLE]] )" Read \s-1POD\s0 from the input filehandle, output to the output filehandle (\s-1STDIN/STDOUT\s0 if no filehandle(s) given). See Pod::Parser docs for more. Note that you can parse multiple files with the same object. All your options will be preserved, as will any text you added with the add*Text methods. .ie n .IP "$parser\->asString" 4 .el .IP "\f(CW$parser\fR\->asString" 4 .IX Item "$parser->asString" Get the \s-1XHTML\s0 as a scalar. You'll probably want to use this with the StringMode option. .ie n .IP "$parser\->asStringRef" 4 .el .IP "\f(CW$parser\fR\->asStringRef" 4 .IX Item "$parser->asStringRef" As above, but you get a reference to the string, not the string itself. .ie n .IP "$parser\->addHeadText( $text )" 4 .el .IP "\f(CW$parser\fR\->addHeadText( \f(CW$text\fR )" 4 .IX Item "$parser->addHeadText( $text )" Inserts some text just before the closing head tag. For example you can add a link to a stylesheet. May be called many times to add lots of text. Note: you need to call this some time \fBbefore\fR any output is done, e.g. straight after \&\fInew()\fR. Make sure that you only insert valid \s-1XHTML\s0 fragments. .ie n .IP "$parser\->addBodyOpenText( $text ) / $parser\->addBodyCloseText( $text )" 4 .el .IP "\f(CW$parser\fR\->addBodyOpenText( \f(CW$text\fR ) / \f(CW$parser\fR\->addBodyCloseText( \f(CW$text\fR )" 4 .IX Item "$parser->addBodyOpenText( $text ) / $parser->addBodyCloseText( $text )" Inserts some text right at the beginning (or ending) of the body element. For example you can add a navigation header and footer. May be called many times to add lots of text. Note: you need to call this some time \fBbefore\fR any output is done, e.g. straight after \fInew()\fR. Make sure that you only insert valid \s-1XHTML\s0 fragments. .SH "OPTIONS" .IX Header "OPTIONS" .IP "StringMode" 4 .IX Item "StringMode" Default: 0. If set to 1 this does no output at all, even if filenames/handles are supplied. Use asString or asStringRef to access the text if you set this option. .IP "MakeIndex" 4 .IX Item "MakeIndex" Default: 1. If set to 1 then an index of sections is created at the top of the body. If set to 2 then the index includes non-bulleted list items .IP "MakeMeta" 4 .IX Item "MakeMeta" Default: 1. If set to 1 then some meta tags are created, recording things like input file, description, etc. .IP "FragmentOnly" 4 .IX Item "FragmentOnly" Default: 0. If 1, we only produce an \s-1XHTML\s0 fragment (suitable for use as a server-side include etc). There is no \s-1HEAD\s0 element nor any \s-1BODY\s0 or \s-1HTML\s0 tags. Any text added with the add*Text methods will \fBnot\fR be output. .IP "TopHeading" 4 .IX Item "TopHeading" Allows you to set the starting heading level when in fragment mode. For example, if your document already has h1 tags and you want the generated \s-1POD\s0 to nest inside the outline, you can specify .Sp .Vb 1 \& TopHeading => 2 .Ve .Sp and \f(CW\*(C`=head1\*(C'\fR will be tagged with h2 tags, \f(CW\*(C`=head3\*(C'\fR with h3, and so on. .Sp Note that \s-1XHTML\s0 doesn't allow for heading tags past h6, so h7 and up will be translated to h6 as necessary. .IP "TopLinks" 4 .IX Item "TopLinks" At each section head this text is added to provide a link back to the top. Set to 0 or '' to inhibit links, or define your own. .Sp .Vb 1 \& Default:

Top

.Ve .IP "LinkParser" 4 .IX Item "LinkParser" An object that parses links in the \s-1POD\s0 document. By default, this is a regular Pod::Hyperlink object. Any user-supplied link parser must conform the the Pod::Hyperlink \s-1API.\s0 .Sp This module works with a Pod::Hyperlink::BounceURL link parser and generates hyperlinks as 'a' elements with a class of 'pod_xhtml_bounce_url'. The optional text giving the \*(L"node\*(R" is enclosed in a 'strong' element with a class of 'pod_xhtml_bounce_url_text' .SH "RATIONALE" .IX Header "RATIONALE" There's Pod::PXML and Pod::XML, so why do we need Pod::Xhtml? You need an \s-1XSLT\s0 to transform \s-1XML\s0 into \s-1XHTML\s0 and many people don't have the time or inclination to do this. But they want to make sure that the pages they put on their web site are well-formed, they want those pages to use stylesheets easily, and possibly they want to squirt the \s-1XHTML\s0 through some kind of filter for more processing. .PP By generating well-formed \s-1XHTML\s0 straight away we allow anyone to just use the output files as-is. For those who want to use \s-1XML\s0 tools or transformations they can use the \s-1XHTML\s0 as a source, because it's a well-formed \s-1XML\s0 document. .SH "CAVEATS" .IX Header "CAVEATS" This module outputs well-formed \s-1XHTML\s0 if the \s-1POD\s0 is well-formed. To check this you can use something like: .PP .Vb 2 \& use Pod::Checker; \& my $syn = podchecker($defaultIn); .Ve .PP If \f(CW$syn\fR is 0 there are no syntax errors. If it's \-1 then no \s-1POD\s0 was found. Any positive number indicates that that number of errors were found. If the input \&\s-1POD\s0 has errors then the output \s-1XHTML \s0\fIshould\fR be well-formed but will probably omit information, and in addition Pod::Xhtml will emit warnings. Note that Pod::Parser seems to be sensitive to the current setting of $/ so ensure it's the end-of-line character when the parsing is done. .SH "AUTHOR" .IX Header "AUTHOR" P Kent & Simon Flack .SH "COPYRIGHT" .IX Header "COPYRIGHT" (c) \s-1BBC 2004, 2005.\s0 This program is free software; you can redistribute it and/or modify it under the \s-1GNU GPL.\s0 .PP See the file \s-1COPYING\s0 in this distribution, or http://www.gnu.org/licenses/gpl.txt