Actions
Bug #5839
closed![Author: Martin Honnen](https://www.gravatar.com/avatar/3ea75023c3c487f36257090d420b7c50?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
SaxonCS.exe query -qs doesn't find file in local working directory: FODC0002 Exception thrown by URIResolver
Start date:
2023-01-19
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Description
Testing on Windows, I can run e.g. Saxon HE Java fine from the command line with -qs:"'cars-example-json-as-xml.xml' => doc() => xml-to-json()"
, it finds the local file cars-example-json-as-xml.xml
fine.
SaxonCS (tested with both 11 and 12), however fails, looking for a file file:///C:/Users/marti/OneDrive/Documents/xslt/blog-xslt-3-by-example/xml-to-json/file:/C:/Users/marti/OneDrive/Documents/xslt/blog-xslt-3-by-example/xml-to-json
:
'C:\Program Files\Saxonica\SaxonCS-12.0\SaxonCS.exe' query -t -qs:"'cars-example-json-as-xml.xml' => doc() => xml-to-json()"
SaxonCS-EE 12.0 from Saxonica
.NET 6.0.10 on Windows 10.0.22621.0
Using license serial number V..
..
Analyzing query from {'cars-example-json-as-xml.xml' => doc() => xml-to-json()}
Analysis time: 18.4502 milliseconds
Error on line 1 column 1 of xml-to-json:
FODC0002 Exception thrown by URIResolver resolving `cars-example-json-as-xml.xml` against
`file:///C:/Users/marti/OneDrive/Documents/xslt/blog-xslt-3-by-example/xml-to-json/file:/C:/Users/marti/OneDrive/Documents/xslt/blog-xslt-3-by-example/xml-to-json'
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.File.OpenRead(String path)
at Org.XmlResolver.Utils.UriUtils._getFileStream(String uri)
at Org.XmlResolver.Utils.UriUtils.GetStream(String uri, Assembly asm)
at Org.XmlResolver.Utils.UriUtils.GetStream(Uri uri)
at Saxon.Callbacks.DirectResourceResolver.resolve(JJ_ResourceRequest request)
at Saxon.Hej.lib.JJ_ResourceRequest.resolve(JJ_ResourceResolver[] resolvers)
at Saxon.Hej.functions.DocumentFn.resolveURI(String href, String baseURI, String documentKey, XPathContext context)
: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. : 'C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-example\xml-to-json\file:\C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-example\cars-example-json-as-xml.xml'
<?xml version="1.0" encoding="UTF-8"?>Query processing failed: Exception thrown by URIResolver resolving `cars-example-json-as-xml.xml` against `file:///C:/Users/marti/OneDrive/Documents/xslt/blog-xslt-3-by-example/xml-to-json/file:/C:/Users/marti/OneDrive/Documents/xslt/blog-xslt-3-by-example/xml-to-json': Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. : 'C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-example\xml-to-json\file:\C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-example\cars-example-json-as-xml.xml'
Exiting with code 2
That seems a bug to me.
Please register to edit this issue
Actions