Project

Profile

Help

Bug #3675

closed

Invalid URI for stylesheet: <name>

Added by O'Neil Delpratt almost 7 years ago. Updated over 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.

Please register to edit this issue

Also available in: Atom PDF