1Publican::Builder::DocBUosoekr(3C)ontributed Perl DocumePnutbaltiicoann::Builder::DocBook(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

15       Manipulate DocBook XML and convert to other formats.
16

INTERFACE

18   new
19       Create a new Publican::Builder::DocBook object.
20
21   build
22       Transform the source in to another format.
23
24 #BUGBUG fix templates print( $OUT <<EOL \t\t\t\t\t\t<div class="group" id="[%
25       prod %]-[% ver.replace('\\.', '-')%]-$sort">
26       \t\t\t\t\t\t\t<span>$term</span> EOL );
27                                           print( $OUT <<EOL
28       \t\t\t\t\t\t\t<span>$text</span>
29       EOL
30                                           ) if ( $text && $text ne "" );
31
32                                           print( $OUT <<EOL
33       \t\t\t\t\t\t</div>
34       EOL
35                                           );
36
37   transform
38       Run XSLT over XML
39
40   drupal_transform
41       Write csv file for drupal node import
42
43   escape_xml
44       Escapes an input string so that it can be used in an XML Element.
45
46   get_nodes_order
47       Get all nodes with id from xml files in order
48
49   get_chunk_filename
50       Gets the chunked filename for an LibXML::Node in a tree.
51
52   convert_num_to_alpha
53       Converts a numeric number to an alpha list item. ie 1 -> a, 27 -> aa
54
55   build_drupal_book
56       Convert each html file into csv a row for drupal.
57
58   adjustColumnWidths
59       Adjust column widths for XML Tables. Converts hard coded to px and
60       relative withs to %.
61
62       FO input:
63
64       "<?xml version=\"1.0\"?>\n<fo:table-column
65       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"1\"
66       column-width=\"1*\"/>\n<fo:table-column
67       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"2\"
68       column-width=\"2*\"/>\n<fo:table-column
69       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"3\"
70       column-width=\"1*\"/>\n<fo:table-column
71       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"4\"
72       column-width=\"3*\"/>\n"
73
74       HTML input:
75
76       "<?xml version=\"1.0\"?>\n<colgroup
77       xmlns=\"http://www.w3.org/1999/xhtml\"><col width=\"1*\"/><col
78       width=\"2*\"/><col width=\"1*\"/><col width=\"3*\"/></colgroup>\n"
79
80       Returns: modified input tree which is XHTML or XML:FO
81
82   highlight
83       perl_highlight syntax highlighting
84
85       Edit highlight_color template in pdf.xsl and .perl_XXX in CSS to change
86       highlight colours
87
88       Returns: Modified input tree, which is DocBook XML.
89
90   insertCallouts
91       XSLT callout function for inserting Callout markup in to verbatim text.
92
93       Parameters:      areaspec: the DocBook areaspec node set      verbatim:
94       the XHTML/XML:FO tree to place gfx in
95
96       Returns: modified $verbatim
97
98       BUGBUG: BZ #561618 BUGBUG: The approach taken here does not work for
99       tagged content in the verbatim.  BUGBUG: Need to walk the node tree in
100       childnode instead of using it as a string.  BUGBUG: make sure class is
101       being set
102
103   numberLines
104       perl_numberLines XSL function for numbering lines.
105
106       Returns: Modified input tree, which is DocBook XML.
107
108   web_labels
109       Determine if the labels use in the web navigation are different from
110       the names used for packaging.
111
112   change_log
113       Generate an RPM style change log from $xml_lang/Revision_History.xml
114
115   get_abstract
116       Return the abstract for the supplied language with all white space
117       truncated.
118
119       ## BUGBUG this should be moved to the DocBook sub classes
120
121   get_subtitle
122       Return the subtitle for the supplied language with white space
123       truncated.
124
125       ## BUGBUG this should be moved to the DocBook sub classes
126
127   get_author_list
128       Return the author list for the supplied language.
129
130   get_contributors
131       Return the contributor hash for the supplied language.
132
133       ## BUGBUG this should be moved to the DocBook sub classes
134
135   get_keywords
136       Return the contributor hash for the supplied language.
137
138       ## BUGBUG this should be moved to the DocBook sub classes
139
140   get_legalnotice
141       Return the legal notice for the supplied language.
142
143       ## BUGBUG this should be moved to the DocBook sub classes
144
145   get_draft
146       Is the book in draft mode?.
147
148       ## BUGBUG this should be moved to the DocBook sub classes
149
150   to_html
151       Convert an XML::Element node containing DocBook XML directly to HTML
152       text.
153
154   headings
155       Create an array of all headings in DocBook XML.
156
157   links
158       Convert DocBook links in to HTML5 anchors.
159
160   footnotes
161       Convert DocBook footnotes in to HTML5 footnotes.
162
163   highlight2
164       Highlight code blocks in HTML5.
165
166       TODO replace with highlight.js??
167
168   number_lines
169       Number lines in HTML5 code blocks.
170
171   toc
172       Create an HTML5 TOC.
173

DIAGNOSTICS

175       "unknown args %s"
176           All subs with named parameters will return this error when
177           unexpected named arguments are provided.
178
179       "%s is a required argument"
180           Any sub with a mandatory parameter will return this error if the
181           parameter is undef.
182

CONFIGURATION AND ENVIRONMENT

184       Publican requires no configuration files or environment variables.
185

DEPENDENCIES

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

INCOMPATIBILITIES

193       None reported.
194

BUGS AND LIMITATIONS

196       No bugs have been reported.
197
198       Please report any bugs or feature requests to
199       "publican-list@redhat.com", or through the web interface at
200       <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&component=publican>.
201

AUTHOR

203       Jeff Fearn  "<jfearn@redhat.com>"
204
205
206
207perl v5.34.0                      2021-07-23     Publican::Builder::DocBook(3)
Impressum