XMLNews::HTMLTemplate 0.01 review

Download
by rbytes.net on

XMLNews::HTMLTemplate is Perl module for converting NITF to HTML. SYNOPSIS use XMLNews::HTMLTemplate; my $template = new

License: Perl Artistic License
File size: 8K
Developer: David Megginson
0 stars award from rbytes.net

XMLNews::HTMLTemplate is Perl module for converting NITF to HTML.

SYNOPSIS

use XMLNews::HTMLTemplate;

my $template = new XMLNews::HTMLTemplate();
$template->readTemplate("mytemplate.html");

$template->applyTemplate("output.html", "story.xml", "story.rdf");

NOTE: this module requires the XML::Parser and XMLNews::Meta modules.

WARNING: this module is not thread-safe or re-entrant.

The XMLNews::HTMLTemplate module provides a simple mechanism for creating HTML pages from XML/NITF news stories and/or XML/RDF metadata files based on a user-supplied template file. The template is a simple HTML file (SGML or XML flavour) using special template commands, which the user includes as processing instructions, as in the following example:



To create an HTML page, you must first create an empty HTMLTemplate object:

my $template = new XMLNews::HTMLTemplate();

Next, you load the HTML template into the object:

$template->readTemplate("mytemplate.html");

Now, you can apply the same compiled template object repeatedly to different XML/NITF and/or XML/RDF documents to generate HTML pages:

$template->applyTemplate("outfile.html", "newsstory.xml", "newsstory.rdf");

Requirements:
Perl

XMLNews::HTMLTemplate 0.01 search tags