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

DIAGNOSTICS

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

CONFIGURATION AND ENVIRONMENT

175       Publican requires no configuration files or environment variables.
176

DEPENDENCIES

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

INCOMPATIBILITIES

185       None reported.
186

BUGS AND LIMITATIONS

188       No bugs have been reported.
189
190       Please report any bugs or feature requests to
191       "publican-list@redhat.com", or through the web interface at
192       <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&amp;version=rawhide&amp;component=publican>.
193

AUTHOR

195       Jeff Fearn  "<jfearn@redhat.com>"
196
197
198
199perl v5.10.1                      2010-11-12              Publican::Builder(3)
Impressum