DOKK / manpages / debian 10 / publican / Publican::Builder::DocBook.3pm.en
Publican::Builder::DocBook(3pm) User Contributed Perl Documentation Publican::Builder::DocBook(3pm)

Publican::Builder::DocBook - A module to Convert XML to various output formats

    use Publican::Builder::DocBook;
    my $builder = Publican::Builder::DocBook->new();
    $builder->clean_ids();

Manipulate DocBook XML and convert to other formats.

Create a new Publican::Builder::DocBook object.

Transform the source in to another format.

                                    print( $OUT <<EOL
\t\t\t\t\t\t\t<span>$text</span>
EOL
                                    ) if ( $text && $text ne "" );
                                    print( $OUT <<EOL
\t\t\t\t\t\t</div>
EOL
                                    );

Run XSLT over XML

Write csv file for drupal node import

Escapes an input string so that it can be used in an XML Element.

Get all nodes with id from xml files in order

Gets the chunked filename for an LibXML::Node in a tree.

Converts a numeric number to an alpha list item. ie 1 -> a, 27 -> aa

Convert each html file into csv a row for drupal.

Adjust column widths for XML Tables. Converts hard coded to px and relative withs to %.

FO input:

"<?xml version=\"1.0\"?>\n<fo:table-column xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"1\" column-width=\"1*\"/>\n<fo:table-column xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"2\" column-width=\"2*\"/>\n<fo:table-column xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"3\" column-width=\"1*\"/>\n<fo:table-column xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"4\" column-width=\"3*\"/>\n"

HTML input:

"<?xml version=\"1.0\"?>\n<colgroup xmlns=\"http://www.w3.org/1999/xhtml\"><col width=\"1*\"/><col width=\"2*\"/><col width=\"1*\"/><col width=\"3*\"/></colgroup>\n"

Returns: modified input tree which is XHTML or XML:FO

perl_highlight syntax highlighting

Edit highlight_color template in pdf.xsl and .perl_XXX in CSS to change highlight colours

Returns: Modified input tree, which is DocBook XML.

XSLT callout function for inserting Callout markup in to verbatim text.

Parameters: areaspec: the DocBook areaspec node set verbatim: the XHTML/XML:FO tree to place gfx in

Returns: modified $verbatim

BUGBUG: BZ #561618 BUGBUG: The approach taken here does not work for tagged content in the verbatim. BUGBUG: Need to walk the node tree in childnode instead of using it as a string. BUGBUG: make sure class is being set

perl_numberLines XSL function for numbering lines.

Returns: Modified input tree, which is DocBook XML.

Determine if the labels use in the web navigation are different from the names used for packaging.

Generate an RPM style change log from $xml_lang/Revision_History.xml

Return the abstract for the supplied language with all white space truncated.

## BUGBUG this should be moved to the DocBook sub classes

Return the subtitle for the supplied language with white space truncated.

## BUGBUG this should be moved to the DocBook sub classes

Return the author list for the supplied language.

Return the contributor hash for the supplied language.

## BUGBUG this should be moved to the DocBook sub classes

Return the contributor hash for the supplied language.

## BUGBUG this should be moved to the DocBook sub classes

Return the legal notice for the supplied language.

## BUGBUG this should be moved to the DocBook sub classes

Is the book in draft mode?.

## BUGBUG this should be moved to the DocBook sub classes

Convert an XML::Element node containing DocBook XML directly to HTML text.

Create an array of all headings in DocBook XML.

Convert DocBook links in to HTML5 anchors.

Convert DocBook footnotes in to HTML5 footnotes.

Highlight code blocks in HTML5.

TODO replace with highlight.js??

Number lines in HTML5 code blocks.

Create an HTML5 TOC.

"unknown args %s"
All subs with named parameters will return this error when unexpected named arguments are provided.
"%s is a required argument"
Any sub with a mandatory parameter will return this error if the parameter is undef.

Publican requires no configuration files or environment variables.

Carp version Publican Publican::XmlClean Publican::Translate File::Path File::pushd File::Find XML::LibXSLT XML::LibXML Cwd Archive::Tar DateTime DateTime::Format::DateParse Syntax::Highlight::Engine::Kate HTML::TreeBuilder HTML::FormatText Term::ANSIColor POSIX

None reported.

No bugs have been reported.

Please report any bugs or feature requests to "publican-list@redhat.com", or through the web interface at <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&component=publican>.

Jeff Fearn "<jfearn@redhat.com>"

2018-07-08 perl v5.26.2