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   drupal_transform
54       Write csv file for drupal node import
55
56   get_nodes_order
57       Get all nodes with id from xml files in order
58
59   build_drupal_book
60       Convert each html file into csv a row for drupal.
61
62   clean_ids
63       Travers over the source XML and update the id's to match the standard
64       format.
65
66       Updates all existing PO files with the new xref links.
67
68   adjustColumnWidths
69       Adjust column widths for XML Tables. Converts hard coded to px and
70       relative withs to %.
71
72       FO input:
73
74       "<?xml version=\"1.0\"?>\n<fo:table-column
75       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"1\"
76       column-width=\"1*\"/>\n<fo:table-column
77       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"2\"
78       column-width=\"2*\"/>\n<fo:table-column
79       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"3\"
80       column-width=\"1*\"/>\n<fo:table-column
81       xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" column-number=\"4\"
82       column-width=\"3*\"/>\n"
83
84       HTML input:
85
86       "<?xml version=\"1.0\"?>\n<colgroup
87       xmlns=\"http://www.w3.org/1999/xhtml\"><col width=\"1*\"/><col
88       width=\"2*\"/><col width=\"1*\"/><col width=\"3*\"/></colgroup>\n"
89
90       Returns: modified input tree which is XHTML or XML:FO
91
92   highlight
93       perl_highlight syntax highlighting
94
95       Edit highlight_color template in pdf.xsl and .perl_XXX in CSS to change
96       highlight colours
97
98       Returns: Modified input tree, which is DocBook XML.
99
100   insertCallouts
101       XSLT callout function for inserting Callout markup in to verbatim text.
102
103       Parameters:      areaspec: the DocBook areaspec node set      verbatim:
104       the XHTML/XML:FO tree to place gfx in
105
106       Returns: modified $verbatim
107
108       BUGBUG: BZ #561618 BUGBUG: The approach taken here does not work for
109       tagged content in the verbatim.  BUGBUG: Need to walk the node tree in
110       childnode instead of using it as a string.  BUGBUG: make sure class is
111       being set
112
113   numberLines
114       perl_numberLines XSL function for numbering lines.
115
116       Returns: Modified input tree, which is DocBook XML.
117
118   package_brand
119       Create the structure for the distributed files and save it as a tar.gz
120       file
121
122   package_home
123       Package a book for use as a Publican Website home page.
124
125   build_rpm
126       Build an srpm for books and brands.
127
128   package
129       Create the structure for the distributed files and save it as a tar.gz
130       file
131
132       Creates RPM Specfile and build SRPM.
133
134       TODO: Consider handling other package formats, deb etc.
135
136   web_labels
137       Determine if the labels use in the web navigation are different from
138       the names used for packaging.
139
140   change_log
141       Generate an RPM style change log from $xml_lang/Revision_History.xml
142
143   get_books
144       Fetch all the books for a set from a repo.
145
146       Supported Repos: SVN
147
148   build_set_books
149       Prepare XML from sub books for Remote Sets
150
151   NAME
152       Description
153
154       #    my $lang = delete( $args->{lang} ) || croak(maketext("lang is a
155       mandatory argument")); # #    if ( %{$args} ) { #        croak(
156       maketext("unknown arguments: [_1]", join( ", ", keys %{$arg}) )); #
157       }
158
159           return;
160       }
161

DIAGNOSTICS

163       "unknown args %s"
164           All subs with named parameters will return this error when
165           unexpected named arguments are provided.
166
167       "%s is a required argument"
168           Any sub with a mandatory parameter will return this error if the
169           parameter is undef.
170

CONFIGURATION AND ENVIRONMENT

172       Publican requires no configuration files or environment variables.
173

DEPENDENCIES

175       Carp version Config::Simple Publican Publican::XmlClean
176       Publican::Translate File::Path File::pushd File::Find XML::LibXSLT
177       XML::LibXML Cwd Archive::Tar DateTime DateTime::Format::DateParse
178       Syntax::Highlight::Engine::Kate HTML::TreeBuilder HTML::FormatText
179       Term::ANSIColor POSIX
180

INCOMPATIBILITIES

182       None reported.
183

BUGS AND LIMITATIONS

185       No bugs have been reported.
186
187       Please report any bugs or feature requests to
188       "publican-list@redhat.com", or through the web interface at
189       <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&component=publican>.
190

AUTHOR

192       Jeff Fearn  "<jfearn@redhat.com>"
193
194
195
196perl v5.16.3                      2014-12-15              Publican::Builder(3)
Impressum