Actions
Bug #6222
closed![Author: Stefan Krause](https://www.gravatar.com/avatar/2e2bda7d37700dca8ee733f5dfb6ab7c?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Norm Tovey-Walsh](https://www.gravatar.com/avatar/3de1450075377c998ad80d1ede6e0712?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
XMLResolver fails on windows paths in system identifiers that are reachable but can't be resolved, even if "-Dxml.catalog.fixWindowsSystemIdentifiers=true" was given.
Start date:
2023-10-12
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
11, 12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Java
Description
XMLResolver fails on windows paths in system identifiers that are reachable but can't be resolved, even if "-Dxml.catalog.fixWindowsSystemIdentifiers=true" was given.
stack trace:
java.lang.IllegalArgumentException: Illegal character in path at index 1: .\test.dtd
at java.base/java.net.URI.create(Unknown Source)
at java.base/java.net.URI.resolve(Unknown Source)
at org.xmlresolver.Resolver.openConnection(Resolver.java:250)
at org.xmlresolver.Resolver.resolveEntity(Resolver.java:204)
at net.sf.saxon.lib.CatalogResourceResolver.resolveEntity(CatalogResourceResolver.java:194)
at net.sf.saxon.lib.EntityResolverWrappingResourceResolver.resolveEntity(EntityResolverWrappingResourceResolver.java:46)
[…]
Steps to reproduce (see attached ZIP file):
xml-inputfile.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root SYSTEM ".\test.dtd">
<root id="id12345"/>
test.dtd
- is a valid DTD
- is located in the same directory as
xml-inputfile.xml
command line
java -cp "path\to\saxon\*;path\to\saxon\lib\*" -Dxml.catalog.fixWindowsSystemIdentifiers=true net.sf.saxon.Transform -xsl:"main.xsl" -s:"xml-inputfile.xml" -o:"xml-outputfile.xml" [-catalog:catalog_0X.xml]
Current Results
- no catalog given (
run_01.bat
)- fails
- catalog is given and system identifier can be resolved (
run_02.bat
usescatalog_01.xml
)- works
- catalog is given and system identifier can't be resolved (
run_03.bat
usescatalog_02.xml
)- fails
Expected results: (like run_02.bat
)
- input file is loaded
- no exception is thrown
- no warning appears
Files
Please register to edit this issue
Actions