Commits

Toby Inkster committed d83ce58

Prepare for release of some kind...

Comments (0)

Files changed (10)

+############################################################################
+## Changes #################################################################
+############################################################################
+
+XML-Saxon-XSLT2
+===============
+
+Created:      2010-07-14
+Home page:    <http://search.cpan.org/dist/XML-Saxon-XSLT2/>
+Bug tracker:  <http://rt.cpan.org/Dist/Display.html?Queue=XML-Saxon-XSLT2>
+Maintainer:   Toby Inkster <mailto:tobyink@cpan.org>
+
+0.001 [2010-07-15] # Original version
+
 @prefix dcs:     <http://ontologi.es/doap-changeset#> .
 @prefix dc:      <http://purl.org/dc/terms/> .
 @prefix foaf:    <http://xmlns.com/foaf/0.1/> .
-@prefix my:      <http://purl.org/NET/cpan-uri/dist/Example-Example/> .
+@prefix my:      <http://purl.org/NET/cpan-uri/dist/XML-Saxon-XSLT2/> .
 @prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
 @prefix toby:    <http://tobyinkster.co.uk/#> .
 @prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
 <>
 
 	dc:title         "Changes" ;
-	dc:description   "Revision history for Perl extension Example::Example."@en ;
+	dc:description   "Revision history for Perl extension XML::Saxon::XSLT2."@en ;
 	dc:subject       my:project ;
 	dc:creator       toby:i .
 
 #############################################################
 
-my:v_0-01
+my:v_0-001
 
 	a               :Version ;
-	dc:issued       "2000-01-01"^^xsd:date ;
-	:revision       "0.01"^^xsd:string ;
-	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/Example-Example-0.01.tar.gz> ;
-	rdfs:comment    "Original version"@en .
+	dc:issued       "2010-07-15"^^xsd:date ;
+	:revision       "0.001"^^xsd:string ;
+	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/XML-Saxon-XSLT2-0.001.tar.gz> ;
+	rdfs:label      "Original version"@en .
 
 #############################################################
 
 my:project
 
 	a               :Project ;
-	:name           "Example-Example" ;
-	:shortdesc      "Example Project"@en ;
+	:name           "XML-Saxon-XSLT2" ;
+	:shortdesc      "process XSLT 2.0 using Saxon 9.x"@en ;
 	:programming-language  "Perl" ;
-	:homepage       <http://search.cpan.org/dist/Example-Example/> ;
-	:download-page  <http://search.cpan.org/dist/Example-Example/> ;
-	:bug-database   <http://rt.cpan.org/Dist/Display.html?Queue=Example-Example> ;
-	:repository     [ a :SVNRepository ; :browse <http://goddamn.co.uk/viewvc/perlmods/Example-Example/> ] ;
+	:homepage       <http://search.cpan.org/dist/XML-Saxon-XSLT2/> ;
+	:download-page  <http://search.cpan.org/dist/XML-Saxon-XSLT2/> ;
+	:bug-database   <http://rt.cpan.org/Dist/Display.html?Queue=XML-Saxon-XSLT2> ;
+	:repository     [ a :SVNRepository ; :browse <http://goddamn.co.uk/viewvc/perlmods/XML-Saxon-XSLT2/> ] ;
 	:maintainer     toby:i ;
 	:developer      toby:i ;
 	:documenter     toby:i ;
 	:tester         toby:i ;
-	:created        "2000-01-01"^^xsd:date ;
+	:created        "2010-07-14"^^xsd:date ;
 	:license        <http://dev.perl.org/licenses/> ;
-	:release        my:v_0-01 .
+	:release        my:v_0-001 .
 
 #############################################################
 
+<?xml version="1.0" encoding="utf-8"?>
+<rdf:RDF
+   xmlns:dc="http://purl.org/dc/terms/"
+   xmlns:dcs="http://ontologi.es/doap-changeset#"
+   xmlns:foaf="http://xmlns.com/foaf/0.1/"
+   xmlns:my="http://purl.org/NET/cpan-uri/dist/XML-Saxon-XSLT2/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+   xmlns:toby="http://tobyinkster.co.uk/#"
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+   xmlns="http://usefulinc.com/ns/doap#">
+  <rdf:Description rdf:about="file:///home/tai/src/perlmods/XML-Saxon-XSLT2/Changes.ttl">
+    <dc:creator rdf:resource="http://tobyinkster.co.uk/#i"/>
+    <dc:description xml:lang="en">Revision history for Perl extension XML::Saxon::XSLT2.</dc:description>
+    <dc:subject rdf:resource="http://purl.org/NET/cpan-uri/dist/XML-Saxon-XSLT2/project"/>
+    <dc:title>Changes</dc:title>
+  </rdf:Description>
+  <Version rdf:about="http://purl.org/NET/cpan-uri/dist/XML-Saxon-XSLT2/v_0-001">
+    <dc:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2010-07-15</dc:issued>
+    <file-release rdf:resource="http://backpan.cpan.org/authors/id/T/TO/TOBYINK/XML-Saxon-XSLT2-0.001.tar.gz"/>
+    <revision rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.001</revision>
+    <rdfs:label xml:lang="en">Original version</rdfs:label>
+  </Version>
+  <Project rdf:about="http://purl.org/NET/cpan-uri/dist/XML-Saxon-XSLT2/project">
+    <bug-database rdf:resource="http://rt.cpan.org/Dist/Display.html?Queue=XML-Saxon-XSLT2"/>
+    <created rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2010-07-14</created>
+    <developer rdf:resource="http://tobyinkster.co.uk/#i"/>
+    <documenter rdf:resource="http://tobyinkster.co.uk/#i"/>
+    <download-page rdf:resource="http://search.cpan.org/dist/XML-Saxon-XSLT2/"/>
+    <homepage rdf:resource="http://search.cpan.org/dist/XML-Saxon-XSLT2/"/>
+    <license rdf:resource="http://dev.perl.org/licenses/"/>
+    <maintainer rdf:resource="http://tobyinkster.co.uk/#i"/>
+    <name>XML-Saxon-XSLT2</name>
+    <programming-language>Perl</programming-language>
+    <release rdf:resource="http://purl.org/NET/cpan-uri/dist/XML-Saxon-XSLT2/v_0-001"/>
+    <repository>
+      <SVNRepository>
+        <browse rdf:resource="http://goddamn.co.uk/viewvc/perlmods/XML-Saxon-XSLT2/"/>
+      </SVNRepository>
+    </repository>
+    <shortdesc xml:lang="en">process XSLT 2.0 using Saxon 9.x</shortdesc>
+    <tester rdf:resource="http://tobyinkster.co.uk/#i"/>
+  </Project>
+  <foaf:Person rdf:about="http://tobyinkster.co.uk/#i">
+    <ns1:sameAs xmlns:ns1="http://www.w3.org/2002/07/owl#" rdf:resource="http://purl.org/NET/cpan-uri/person/tobyink"/>
+    <foaf:homepage rdf:resource="http://tobyinkster.co.uk/"/>
+    <foaf:mbox rdf:resource="mailto:tobyink@cpan.org"/>
+    <foaf:name>Toby Inkster</foaf:name>
+    <foaf:page rdf:resource="http://search.cpan.org/~tobyink/"/>
+  </foaf:Person>
+</rdf:RDF>
 
 t/00sig.t
 t/01basic.t
+
+inc/Test/Signature.pm
+inc/Module/AutoInstall.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/WriteAll.pm
+inc/Module/Install/NoAutomatedTesting.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/ReadmeFromPod.pm
+inc/Module/Install/DOAPChangeSets.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install.pm
+
+lib/XML/Saxon/XSLT2.pm
+---
+abstract: 'process XSLT 2.0 using Saxon 9.x.'
+author:
+  - 'Toby Inkster <tobyink@cpan.org>'
+build_requires:
+  ExtUtils::MakeMaker: 6.42
+  Test::More: 0.61
+configure_requires:
+  ExtUtils::MakeMaker: 6.42
+distribution_type: module
+generated_by: 'Module::Install version 0.95'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: XML-Saxon-XSLT2
+no_index:
+  directory:
+    - inc
+    - t
+requires:
+  Carp: 1.00
+  IO::Handle: 0
+  Inline::Java: 0
+  Scalar::Util: 0
+  XML::LibXML: 1.60
+  common::sense: 0
+  perl: 5.8.0
+resources:
+  bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=XML-Saxon-XSLT2
+  homepage: http://search.cpan.org/dist/XML-Saxon-XSLT2/
+  license: http://dev.perl.org/licenses/
+  repository: http://goddamn.co.uk/viewvc/perlmods/XML-Saxon-XSLT2/
+version: 0.001
 use warnings;
 
 use inc::Module::Install;
+no_auto_test;
 
-my $dist = 'Example-Example';
+my $dist = 'XML-Saxon-XSLT2';
 my $fn   = "lib/$dist.pm"; $fn =~ s#-#/#g;
 
 name                $dist;
 
 test_requires       'Test::More' => '0.61';
 
+requires            'common::sense'      => 0;
 requires            'Carp'               => '1.00';
-requires            'DateTime'           => 0;
-requires            'RDF::Trine'         => '0.112';
+requires            'Inline::Java'       => 0;
+requires            'IO::Handle'         => 0;
+requires            'Scalar::Util'       => 0;
 requires            'XML::LibXML'        => '1.60';
-requires            'URI'                => '1.30';
-
-# install_script 'fingerw';
 
 resources(
 	'homepage'   => "http://search.cpan.org/dist/$dist/",
+NAME
+    XML::Saxon::XSLT2 - process XSLT 2.0 using Saxon 9.x.
+
+SYNOPSIS
+     my $trans  = XML::Saxon::XSLT2->new( $xslt );
+     my $output = $trans->transform($input);
+
+DESCRIPTION
+    This module implements XSLT 1.0 and 2.0 using Saxon 9.x via
+    Inline::Java.
+
+    It expects Saxon to be installed in either
+    '/usr/share/java/saxon9he.jar' or '/usr/local/share/java/saxon9he.jar'.
+    Future versions should be more flexible. The saxon9he.jar file can be
+    found at <http://saxon.sourceforge.net/> - just dowload the latest Java
+    release of Saxon-HE 9.x, open the Zip archive, extract saxon9he.jar and
+    save it to one of the two directories above.
+
+  Constructor
+    "XML::Saxon::XSLT2->new($xslt)"
+        Creates a new transformation. $xslt may be a string, a file handle
+        or an XML::LibXML::Document.
+
+  Methods
+    "$trans->parameters($key=>$value, $key2=>$value2, ...)"
+        Sets transformation parameters prior to running the transformation.
+
+        Each key is a parameter name.
+
+        Each value is the parameter value. This may be a scalar, in which
+        case it's treated as an xs:string; a DateTime object, which is
+        treated as an xs:dateTime; a URI object, xs:anyURI; a Math::BigInt,
+        xs:long; or an arrayref where the first element is the type and the
+        second the value. For example:
+
+         $trans->parameters(
+            now           => DateTime->now,
+            madrid_is_capital_of_spain => [ boolean => 1 ],
+            price_of_fish => [ decimal => '1.99' ],
+            my_link       => URI->new('http://example.com/'),
+            your_link     => [ uri => 'http://example.net/' ],
+            );
+
+        The following types are supported via the arrayref notation: float,
+        double, long (alias int, integer), decimal, bool (alias boolean),
+        string, qname, uri, date, datetime. These are case-insensitive.
+
+    "$trans->transform($doc, $type)"
+        Run a transformation, returning the output as a string.
+
+        $doc may be a string, a file handle or an XML::LibXML::Document.
+
+        $type may be 'xml', 'xhtml', 'html' or 'text' to set the output
+        mode. 'xml' is the default.
+
+    "$trans->transform_document($doc, $type)"
+        Run a transformation, returning the output as an
+        XML::LibXML::Document.
+
+        $doc may be a string, a file handle or an XML::LibXML::Document.
+
+        $type may be 'xml', 'xhtml', 'html' or 'text' to set the output
+        mode. 'xml' is the default.
+
+        This method is slower than "transform".
+
+BUGS
+    Please report any bugs to <http://rt.cpan.org/>.
+
+    Known limitations:
+
+    *   xsl:message
+
+        Saxon outputs messages written via <xsl:message> to STDERR. There
+        doesn't seem to be any way to capture and return these messages (not
+        even using Capture::Tiny or its ilk).
+
+SEE ALSO
+    "XML::LibXSLT" is probably more reliable, and allows you to define your
+    own XSLT extension functions. However, the libxslt library that it's
+    based on only supports XSLT 1.0.
+
+AUTHOR
+    Toby Inkster <tobyink@cpan.org>.
+
+COPYRIGHT
+    Copyright 2010 Toby Inkster
+
+    This library is free software; you can redistribute it and/or modify it
+    under the same terms as Perl itself.
+
+#!/usr/bin/perl
+
 use lib "lib";
 use XML::Saxon::XSLT2;
 
+#!/usr/bin/perl
+
 use lib "lib";
 use XML::LibXML;
 use XML::Saxon::XSLT2;

lib/XML/Saxon/XSLT2.pm

 
 =head1 NAME
 
-XML::Saxon::XSLT2 - process XSLT 2.0 using Saxon 9.
+XML::Saxon::XSLT2 - process XSLT 2.0 using Saxon 9.x.
 
 =head1 SYNOPSIS
 
 
 =head1 DESCRIPTION
 
-This module implements XSLT 1.0 and 2.0 using Saxon 9 via L<Inline::Java>.
+This module implements XSLT 1.0 and 2.0 using Saxon 9.x via L<Inline::Java>.
 
 It expects Saxon to be installed in either '/usr/share/java/saxon9he.jar'
 or '/usr/local/share/java/saxon9he.jar'. Future versions should be more
-flexible.
+flexible. The saxon9he.jar file can be found at L<http://saxon.sourceforge.net/> -
+just dowload the latest Java release of Saxon-HE 9.x, open the Zip archive,
+extract saxon9he.jar and save it to one of the two directories above.
 
 =head2 Constructor
 
 
 Please report any bugs to L<http://rt.cpan.org/>.
 
+Known limitations:
+
+=over 4
+
+=item * B<xsl:message>
+
+Saxon outputs messages written via E<lt>xsl:messageE<gt> to STDERR. There
+doesn't seem to be any way to capture and return these messages (not even using
+L<Capture::Tiny> or its ilk).
+
+=back
+
 =head1 SEE ALSO
 
 C<XML::LibXSLT> is probably more reliable, and allows you to define your
 	}
 
 	public void paramAddDate (String key, String value)
-		throws net.sf.saxon.s9api.SaxonApiException
+		throws SaxonApiException
 	{
 		ItemTypeFactory itf = new ItemTypeFactory(proc);
 		ItemType dateType = itf.getAtomicType(new QName("http://www.w3.org/2001/XMLSchema", "date"));
 	}
 
 	public void paramAddDateTime (String key, String value)
-		throws net.sf.saxon.s9api.SaxonApiException
+		throws SaxonApiException
 	{
 		ItemTypeFactory itf = new ItemTypeFactory(proc);
 		ItemType dateTimeType = itf.getAtomicType(new QName("http://www.w3.org/2001/XMLSchema", "datetime"));