Bug #3675
closedInvalid URI for stylesheet: <name>
100%
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.
Updated by O'Neil Delpratt almost 7 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.
Updated by O'Neil Delpratt over 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