Actions
Bug #6222
closedXMLResolver 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