Bug #2345
closedTransformation failed: Error opening packaged stylesheet file or Invalid URI for stylesheet
100%
Description
I have determined that java net.sf.saxon.Transform -s:source -xsl:stylesheet -o:output is broken (or at least significantly different) starting in 9.6.0.1 when the following conditions are met:
-
stylesheet is packaged by com.saxonica.ptree.StylesheetPackager
-
the resulting output of the packager is a file whose name contains whitespace
-
the -xsl argument is encoded as a URI (one type of error) or it is not encoded as a URI (another type of error)
To test this, I have created a test.sh (attached). I have created two directories, one for each version of saxonica. Each directory contains pe, he, unpack, and a license. The script creates an xsl transform file, an xml input file, and then loops over each version. For each version it compiles the xsl and executes it. If the execution fails, it tries to encode the xsl as a uri and then tries again.
Below is my console output showing how 9.5.1.8 is ok but 9.6.0.1 is not.
17:09:31 $ sh test.sh
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
rw-r--r- 1 jholt wheel 280 Mar 31 17:09 /tmp/t est.zip
total 44176
-rw-r--r--+ 1 jholt staff 338 Mar 31 17:03 saxon-license.lic
-rw-r--r--+ 1 jholt staff 20831 Oct 31 16:01 saxon9-unpack.jar
-rw-r--r--+ 1 jholt staff 10297682 Oct 31 16:02 saxon9he.jar
-rw-r--r--+ 1 jholt staff 12286131 Oct 31 16:02 saxon9pe.jar
SAXON 9.5.1.8 from Saxonica (build 103109)
SAXON 9.5.1.8 from Saxonica (build 103109)
Compiling
Transforming
hi
total 18000
-rw-r--r--+ 1 jholt staff 338 Mar 31 17:04 saxon-license.lic
-rw-r--r--+ 1 jholt staff 13425 Oct 2 22:09 saxon9-unpack.jar
-rw-r--r--+ 1 jholt staff 4161912 Oct 2 22:09 saxon9he.jar
-rw-r--r--+ 1 jholt staff 5025845 Oct 2 22:09 saxon9pe.jar
SAXON 9.6.0.1 from Saxonica (build 101022)
SAXON 9.6.0.1 from Saxonica (build 101022)
Compiling
Transforming
Error
Invalid URI for stylesheet: /tmp/t est.zip
Invalid URI for stylesheet: /tmp/t est.zip
Transforming again
Transformation failed: Error opening packaged stylesheet file file:///tmp/t%20est.zip
17:10:19 $
Files
Please register to edit this issue