Project

Profile

Help

Bug #5269

closed

Starting a transformation from the command line with -xsl -it -u

Added by Johan Gheys about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2022-02-03
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

We use Saxon-EE to perform batch transformations. A typical command line looks like this: java -jar path-to-saxon-ee-10.6.jar -xsl:batch.xslt -it -u With version 10.6 this has worked perfectly so far, but when using version 11.1 we get the following error message "URIResolver for stylesheet file must return a Source".


Files

batch.xslt (1.47 KB) batch.xslt Johan Gheys, 2022-02-03 14:07
command-line-10.6-ok.bat (97 Bytes) command-line-10.6-ok.bat Johan Gheys, 2022-02-03 14:08
command-line-11.1-nok.bat (97 Bytes) command-line-11.1-nok.bat Johan Gheys, 2022-02-03 14:08
Actions #1

Updated by Michael Kay about 2 years ago

  • Status changed from New to In Progress

Problem reproduced.

Actions #2

Updated by Michael Kay about 2 years ago

JUnit test created: commands/TransformTests/testUOption

Actions #3

Updated by Michael Kay about 2 years ago

Now working in SaxonJ - a one-line fix. At line 737, for the -u case, we construct a ResourceRequest but never run request.resolve().

The same test is failing in SaxonCS with the (rather badly formatted) error

Invalid URI: : Invalid URI: The format of the URI could not be determined.

This is usually caused by passing a relative URI to the new System.Uri() constructor without saying that relative URIs are OK.

Actions #4

Updated by Michael Kay about 2 years ago

  • Status changed from In Progress to Resolved
  • Assignee set to Michael Kay
  • Applies to branch 11, trunk added
  • Fix Committed on Branch 11, trunk added
  • Platforms .NET, Java added

Having some problems on SaxonCS because the current working directory is returned (both by Environment.CurrentDirectory and by System.IO.Directory.GetCurrentDirectory() (both of which we use, in different places) without a trailing "/" which means it has to be modified for use as a base URI.

Solved this by centralising calls to get the current directory to a static method in the File class, and making this method add a trailing "/" if not already present. Test now working on both SaxonJ and SaxonCS.

Actions #5

Updated by Johan Gheys about 2 years ago

Thanks for the quick response!

Actions #6

Updated by Debbie Lockett about 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 11.2 added

Bug fix applied in the Saxon 11.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF