[libxml-saxon-xslt2-perl] 08/18: improve synopsis

Jonas Smedegaard dr at jones.dk
Mon Aug 3 23:46:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.007
in repository libxml-saxon-xslt2-perl.

commit 699f250459fdc7892a73bfa4721ed7d3af444d4c
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date:   Mon Aug 23 16:00:57 2010 +0000

    improve synopsis
    
    --HG--
    branch : XML-Saxon-XSLT2
    extra : convert_revision : svn%3A3fe8e991-6959-4966-b76d-b07eca2b6e37/XML-Saxon-XSLT2%40483
---
 lib/XML/Saxon/XSLT2.pm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/XML/Saxon/XSLT2.pm b/lib/XML/Saxon/XSLT2.pm
index 0913fa3..91b7963 100644
--- a/lib/XML/Saxon/XSLT2.pm
+++ b/lib/XML/Saxon/XSLT2.pm
@@ -172,8 +172,18 @@ XML::Saxon::XSLT2 - process XSLT 2.0 using Saxon 9.x.
 
 =head1 SYNOPSIS
 
+ use XML::Saxon::XSLT2;
+ 
+ # make sure to open filehandle in right encoding
+ open(my $input, '<:encoding(UTF-8)', 'path/to/xml') or die $!;
+ open(my $xslt, '<:encoding(UTF-8)', 'path/to/xslt') or die $!;
+ 
  my $trans  = XML::Saxon::XSLT2->new($xslt, $baseurl);
  my $output = $trans->transform($input);
+ print $output;
+ 
+ my $output2 = $trans->transform_document($input);
+ my @paragraphs = $output2->getElementsByTagName('p');
 
 =head1 DESCRIPTION
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libxml-saxon-xslt2-perl.git



More information about the Pkg-perl-cvs-commits mailing list