NAME
XML::Xalan::Transformer - Perl interface to XalanTransformer class
SYNOPSIS
use XML::Xalan::Transformer;
my $tr = new XML::Xalan::Transformer;
$tr->transform_to_file($src_file, $xsl_file, $dest_file)
or die $tr->errstr;
my $res = $tr->transform_to_data($src_file, $xsl_file);
die $tr->errstr unless defined $res;
DESCRIPTION
Interface to the XalanTransformer class.
METHODS
- new()
-
Constructor, with no argument. Return an XML::Xalan::Transformer object.
my $tr = new XML::Xalan::Transformer;
- $tr->transform_to_file($source, $xsl_file, $dest)
-
Transform a source file into a specified file. Returns undef on failure.
$tr->transform_to_file("foo.xml", "foo.xsl", "bar.xml");
- $tr->transform_to_data($source, $xsl_file)
-
Returns the transformed document. Example:
my $result = $tr->transform_to_data("foo.xml", "foo.xsl");
- $tr->transform_to_handler($source, $xsl, FH, $handler)
-
Example:
$out_handler = sub { my ($ctx, $mesg); print $ctx $mesg; }; $tr->transform_to_handler( $xmlfile, $xslfile, STDERR, $out_handler);
- $tr->errstr()
-
Returns current error string.
AUTHOR
Edwin Pratomo, edpratomo@cpan.org
SEE ALSO
XML::Xalan(3).