The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Alvis::Document - Perl extension for assembling an Alvis documentRecord from given pieces.

SYNOPSIS

 use Alvis::Document;

 # Create a new instance
 my $D=Alvis::Document->new(includeOriginalDocument=>1});
 if (!defined($D))
 {
    die("Instantiating Alvis::Document failed.");
 }

 #
 # Assemble a new document from a canonicalDocument, link information,
 # meta information and the original document text.
 #
 my $alvisXML=$D->assemble({canDoc=>$can_doc,
                            links=>$links,
                            meta=>$meta,
                            origText=>$html});
 if (!defined($alvisXML))
 {
    die $D->errmsg();
 }

DESCRIPTION

A module for assembling an Alvis XML from constituent pieces (canonicalDocument, meta information, links, original text of the document).

METHODS

new()

Options:

    includeOriginalDocument    Include originalDocument in the output?
                               Default: yes.

assemble($ingredients)

Returns the assembled Alvis XML documentRecord. Pieces can be given in the following fields of $ingredients hash:

    canDoc       canonicalDocument
    meta         meta information
    origText     original document text
    links        an instance of Alvis::Document::Links. Link information.

errmsg()

Returns a stack of error messages, if any. Empty string otherwise.

SEE ALSO

Alvis::Document::Type, Alvis::Document::Encoding, Alvis::Document::Meta, Alvis::Document::Links

AUTHOR

Kimmo Valtonen, <kimmo.valtonen@hiit.fi>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Kimmo Valtonen

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.