Business::Associates::XML 1.00 review
DownloadBusiness::Associates::XML is a Perl module for encapsulating XML, XSL, and XSLT operations for the Associates package. SYNOPSIS
|
|
Business::Associates::XML is a Perl module for encapsulating XML, XSL, and XSLT operations for the Associates package.
SYNOPSIS
use Business::Associates::Data();
use Business::Associates::XML();
$data = Business::Associates::Data->$type ($what, $mode);
$xml = new Business::Associates::XML ($data) if defined $data;
$s = $xml->transform($ss_name, %args) if defined $xml;
print "nn$sn";
METHODS
new($data [, %options ])
This constructor takes an Business::Associates::Data object as the required argument. The optional options hash can be used to set additional values.
xml
This is the parsed xml string. If you want to pass special arguments to the XML::LibXML library then you can do it with this argument:
$data = Business::Associates::Data->$type ($what, $mode);
my $xml_string = $data->xml();
my $parser = XML::LibXML->new();
$parser->load_ext_dtd(0); # Global setting, unfortunately :-(
my $xml = new Business::Associates::XML(
xml => $parser->parse_string($xml_string));
...
It is possibly more efficient to access this element directly after the construction to set the options on the newly constructed XML::LibXML object.
transform($stylesheet_name [, %args ] )
This method transforms the XML using the named stylesheet, parsing any additional arguments to the stylesheet transform method. Typically, these additional arguments are used to set global XSLT parameters.
$data = Business::Associates::Data->$type ($what, $mode);
$xml = new Business::Associates::XML ($data);
$s = $xml->transform($ss_name, width => "'3'");
Note that these are named stylesheets. By default, they are found in the Base_Directory (see "Base_Directory") with the same name and the extension .xslt. To change this, either change the Base_Directory variable, or derive another class from this, overriding the get_stylesheet method.
Requirements:
Perl
Business::Associates::XML 1.00 keywords