Project

Profile

Help

-s:https-url command line option not working?

Added by Martin Honnen over 1 year ago

I am struggling to use XQuery with SaxonCS 12.1 from the command line when I try to provide the -s option with a HTTPS URI, I get an error XPDY0002 Finding root of tree: the context item is absent:

"C:\Program Files\Saxonica\SaxonCS-12.1\SaxonCS.exe" query -t -s:https://martin-honnen.github.io/xslt/2023/collection-example1.xml -qs:"/*/*"
SaxonCS-EE 12.1 from Saxonica
.NET 6.0.10 on Windows 10.0.22621.0
Using license serial number ...
Analyzing query from {/*/*}
Analysis time: 37.2269 milliseconds
Error on line 1 column 2 of file:///C:/Users/marti/:
  XPDY0002  Finding root of tree: the context item is absent
<?xml version="1.0" encoding="UTF-8"?>Query processing failed: Finding root of tree: the context item is absent
Exiting with code 2

Isn't that supposed to work to provide a HTTP(S) URI as the -s argument?

SaxonJS's xslt3 tool manages e.g. xslt3 -s:https://martin-honnen.github.io/xslt/2023/collection-example1.xml -xp:"/*/*".


Replies (5)

Please register to reply

-s:https-url command line option not working? - Added by Norm Tovey-Walsh over 1 year ago

Isn't that supposed to work to provide a HTTP(S) URI as the -s
argument?

I would have thought so. I can’t reproduce this on MacOS. Working to
test it on Windows.

Be seeing you,
norm

--
Norm Tovey-Walsh
Saxonica

-s:https-url command line option not working? - Added by Norm Tovey-Walsh over 1 year ago

Norm Tovey-Walsh writes:

I would have thought so. I can’t reproduce this on MacOS. Working to
test it on Windows.

Ah, okay. I’ve reproduced it on both macOS and Windows with the 12.1
release. It appears to work just fine on the head of development for 12.2:

C:\Volumes\Saxonica\src\saxonica\saxondev\build\distributions\SaxonCS-12-2-0-Windows\SaxonCS-12.2>.\SaxonCS query -t -s:https://martin-honnen.github.io/xslt/2023/collection-example1.xml -qs:"//"
SaxonCS-EE 12.2 from Saxonica
.NET 6.0.10 on Windows 10.0.19044.0
Using license serial number V010583
Analyzing query from {//}
Analysis time: 35.241 milliseconds
Processing https://martin-honnen.github.io/xslt/2023/collection-example1.xml
Building tree for https://martin-honnen.github.io/xslt/2023/collection-example1.xml using Saxon.Hej.tree.tiny.TinyBuilder
Tree built in 4.6066ms
Tree size: 8 nodes, 7 characters, 3 attributes

Execution time: 8.7277ms

Memory used: 1Mb

I can’t, alas, speculate off the top of my head what has changed. Mike,
does this seem like a fix you’d have expected?

Be seeing you,
norm

--
Norm Tovey-Walsh
Saxonica

RE: -s:https-url command line option not working? - Added by Norm Tovey-Walsh over 1 year ago

Looks like bug #5939.

Yes, could be. Nothing to do with https: then, per se.

Be seeing you,
norm

--
Norm Tovey-Walsh
Saxonica

RE: -s:https-url command line option not working? - Added by Martin Honnen over 1 year ago

Sorry about the misleading diagnostics or description, I tend to use local file names or local file paths with -s, or, for remote documents, HTTP(S) URIs, almost never use file URIs or other kind of URIs for -s so the failure I noticed was HTTP(S) failing. At least someone could reproduce it, I was thinking I was failing to remember how to use that option...

    (1-5/5)

    Please register to reply