Publican::XmlClean(3pm)

Publican::XmlClean3pm

A module to reformat xml to publican standards

Usage

    use Publican::XmlClean;
    my $cleaner = Publican::XmlClean->new( { clean_id => 1 } );
    foreach my $xml_file ( sort(@xml_files) ) {
        $cleaner->process_file( { file => $xml_file, out_file => $xml_file } );
    }

Overview

Publican::XmlClean tidies XML formatting and filters structure based on input rules.

Interface

new

Create a new Publican::XmlClean object.

print_known_tags

Print a list of tags that have had their output QA'd.

prune_xml($node)

Remove unwanted nodes. i.e. 'profile' in DocBook speak.

Clean_ID

Rename ID's and update xrefs.

If this node has a title as a child set it's ID else remove the ID

print_xml

Print out utf8 XML files

Have to output xml/DTD header

my_as_XML

Traverse tree and output xml as text. Overrides traverse ... evil stuff.

validate_tables

Ensure Tables comply to requirements not enforceable in XML validation.

1. tgroup attribute cols must match the number of entries in every row.

process_file

Create XML::TreeBuilder object and perform operations.

set_unique_ids

Set unique ids for every nodes which have id

create_db

Create a database to track the max unique id

Diagnostics

"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.

"Could not open %s for output!"

The named file could not be opened.

"Can't calculate image size of %s"

Images are automatically scaled if thy are to wide, this check could not be performed due to either access permissions or file weirdness.

Configuration and environment

Publican::XmlClean requires no configuration files or environment variables.

Dependencies

Carp version XML::TreeBuilder Text::Wrap Config::Simple Publican File::Path Term::ANSIColor Cwd

Incompatibilities

None reported.

Bugs and limitations

No bugs have been reported.

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

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 5 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10–12
  6. 13

Author

Jeff Fearn "<[email protected]>"

From publican 4.3.2-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.