1Publican::Builder(3)  User Contributed Perl Documentation Publican::Builder(3)
2
3
4

NAME

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

VERSION

9       This document describes Publican::Builder version 0.1
10

SYNOPSIS

12           use Publican::Builder;
13           my $builder = Publican::Builder->new();
14           $builder->clean_ids();
15

DESCRIPTION

17       Manipulate XML and convert to other formats.
18

INTERFACE

20   new
21       Create a new Publican::XmlBuilder object.
22
23   build
24       Transform the source in to another format.
25
26       Valid formats: eclipse epub html html-single html-desktop man pdf txt
27
28   setup_xml
29       Create the proper directory structure for the XML, including copying in
30       Brand files.
31
32   del_unwanted_dirs
33       Callback that deletes all unwanted directories from the given directory
34       tree. Used to delete CVS and SVN files from the working directories.
35
36   del_unwanted_xml
37       Callback that deletes all unwanted xml from the given directory tree.
38
39   validate_xml
40       Ensure the XML validates against the DTD.
41
42       To debug the XML catalogs
43
44       export XML_DEBUG_CATALOG=1
45
46       test...
47
48       unset XML_DEBUG_CATALOG
49
50   transform
51       Run XSLT over XML
52
53   clean_ids
54       Travers over the source XML and update the id's to match the standard
55       format.
56
57       Updates all existing PO files with the new xref links.
58
59   adjustColumnWidths
60       Adjust column widths for XML Tables. Converts hard coded and relative
61       withs to percentages.
62
63       Based on xsl-stylesheets-1.74.3/html/dtbl.xsl
64
65        Get all the colwidth, NULL == * == 1*
66        Convert $table_width to pt
67        Convert all hard coded widths to pt
68        $total_relative_width = $table_width
69        subtract hard coded widths from $total_relative_width
70        convert hard coded withs to a % of $table_width
71        total all relative widths
72        convert relative widths to a proportion of $total_relative_width
73        convert relative widths to a % of $table_width
74
75       FO input:
76
77       "<?xml version=\"1.0\"?>\n<fo:table-column
78       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"1\"
79       column-width=\"1*\"/>\n<fo:table-column
80       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"2\"
81       column-width=\"2*\"/>\n<fo:table-column
82       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"3\"
83       column-width=\"1*\"/>\n<fo:table-column
84       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"4\"
85       column-width=\"3*\"/>\n"
86
87       HTML input:
88
89       "<?xml version=\"1.0\"?>\n<colgroup
90       xmlns=\"http://www.w3.org/1999/xhtml\"><col width=\"1*\"/><col
91       width=\"2*\"/><col width=\"1*\"/><col width=\"3*\"/></colgroup>\n"
92
93       Returns: modified input tree which is XHTML or XML:FO
94
95   highlight
96       perl_highlight syntax highlighting
97
98       Edit highlight_color template in pdf.xsl and .perl_XXX in CSS to change
99       highlight colours
100
101       Returns: Modified input tree, which is DocBook XML.
102
103   insertCallouts
104       XSLT callout function for inserting Callout markup in to verbatim text.
105
106       Parameters:      areaspec: the DocBook areaspec node set      verbatim:
107       the XHTML/XML:FO tree to place gfx in
108
109       Returns: modified $verbatim
110
111       BUGBUG: BZ #561618 BUGBUG: The approach taken here does not work for
112       tagged content in the verbatim.  BUGBUG: Need to walk the node tree in
113       childnode instead of using it as a string.  BUGBUG: make sure class is
114       being set
115
116   numberLines
117       perl_numberLines XSL function for numbering lines.
118
119       Returns: Modified input tree, which is DocBook XML.
120
121   package_brand
122       Create the structure for the distributed files and save it as a tar.gz
123       file
124
125   package_home
126       Package a book for use as a Publican Website home page.
127
128   build_rpm
129       Build an srpm for books and brands.
130
131   package
132       Create the structure for the distributed files and save it as a tar.gz
133       file
134
135       Creates RPM Specfile and build SRPM.
136
137       TODO: Consider handling other package formats, deb etc.
138
139   web_labels
140       Determine if the labels use in the web navigation are different from
141       the names used for packaging.
142
143   change_log
144       Generate an RPM style change log from $xml_lang/Revision_History.xml
145
146   get_books
147       Fetch all the books for a set from a repo.
148
149       Supported Repos: SVN
150
151   build_set_books
152       Prepare XML from sub books for Remote Sets
153
154   dtd_string
155       Returns a valid DTD for the DocBook tag supplied.
156
157       Parameters:      tag   The root tag for this file      dtdver     The
158       DTD version      ent_file An entity file to include (optional)
159
160   NAME
161       Description
162
163       #    my $lang = delete( $args->{lang} ) || croak(maketext("lang is a
164       mandatory argument")); # #    if ( %{$args} ) { #        croak(
165       maketext("unknown arguments: [_1]", join( ", ", keys %{$arg}) )); #
166       }
167
168           return;
169       }
170

DIAGNOSTICS

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

CONFIGURATION AND ENVIRONMENT

181       Publican requires no configuration files or environment variables.
182

DEPENDENCIES

184       Carp version Config::Simple Publican Publican::XmlClean
185       Publican::Translate File::Copy::Recursive File::Path File::pushd
186       File::Find XML::LibXSLT XML::LibXML Cwd Archive::Tar DateTime
187       DateTime::Format::DateParse Syntax::Highlight::Engine::Kate
188       HTML::TreeBuilder HTML::FormatText Term::ANSIColor POSIX
189

INCOMPATIBILITIES

191       None reported.
192

BUGS AND LIMITATIONS

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

AUTHOR

201       Jeff Fearn  "<jfearn@redhat.com>"
202
203
204
205perl v5.12.4                      2011-09-22              Publican::Builder(3)
Impressum