Project

Profile

Help

Bug #3675

closed

Invalid URI for stylesheet: <name>

Added by O'Neil Delpratt about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
.NET API
Sprint/Milestone:
-
Start date:
2018-02-15
Due date:
% Done:

100%

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

Description

Initially reported in the forum post: https://saxonica.plan.io/boards/2/topics/7116

White spaces in XSLT file path when used with XsltCompiler.Compile(filename) throws the following exception:

“Invalid URI for stylesheet: ”.

But if you place the XSLT file in a path with no white-spaces, this succeeds.

Workaround:

xsltInput = processor.NewDocumentBuilder().Build(new Uri("file:///" + xsltPath)) // the xsltPath string must have escaped white space i.e. %20

Investigation:

The problem is in the open() method of the classUseWhenFilter class. Here we make a call to the URI class constructor on the systemID of the XSLT stylesheet. This will fail if the string contains spaces.

Actions #1

Updated by O'Neil Delpratt about 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Fix Committed on Branch 9.8, trunk added

Bug fixed and committed on the 9.8 and trunk branches. Fix applied in the class UseWhenFilter. Here we make the attempt to escape the string if it fails to create the URI object.

Actions #2

Updated by O'Neil Delpratt about 6 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.8.0.10 added

Bug fix applied in the Saxon 9.8.0.10 maintenance release.

Please register to edit this issue

Also available in: Atom PDF