Project

Profile

Help

Bug #2345

closed

Transformation failed: Error opening packaged stylesheet file or Invalid URI for stylesheet

Added by Jeff Holt over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Command Line
Sprint/Milestone:
Start date:
2015-03-31
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

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:

  1. stylesheet is packaged by com.saxonica.ptree.StylesheetPackager

  2. the resulting output of the packager is a file whose name contains whitespace

  3. 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

test.sh (1.06 KB) test.sh shell script Jeff Holt, 2015-04-01 00:23

Please register to edit this issue

Also available in: Atom PDF