Discussion:
[saxon] Getting started check gives error "module with no systemId*"
Larry Evans
2014-03-29 14:12:17 UTC
Permalink
After downloading:

http://iweb.dl.sourceforge.net/project/saxon/Saxon-HE/9.5/SaxonHE9-5-1-5J.zip

and unzipping into:

~/dwnlds/saxon/9.5

I tried the test in item 4 of:

http://www.saxonica.com/documentation/#!about/gettingstarted/gettingstartedjava

however, this resulted in error messages which I (as a newbie) have no
idea how to interpret:

~/dwnlds/saxon/9.5 $
/home/evansl/dwnlds/oracle/jdk_8_nb_8/install.dir/jdk1.8.0/bin/java -cp
./saxon9he.jar net.sf.saxon.Query -t -qs:current-date()
Saxon-HE 9.5.1.5J from Saxonica
Java version 1.8.0
Analyzing query from {current-date}
Analysis time: 394.15976 milliseconds
Error on line 1 of *module with no systemId*:
XPDY0002: The context item is absent
Query processing failed: Run-time errors were reported

What should I do to fix this problem?

TIA.

-regards,
Larry
Michael Kay
2014-03-30 12:06:30 UTC
Permalink
Unfortunately different operating system shells differ in how they handle punctuation characters such as "(" and ") on the command line. I get a different error with this using the bash shell on Mac:

syntax error near unexpected token `('
-qs:"current-date()"
I suspect that your shell, for some reason, has passed an argument that omits the brackets, which means your query becomes "current-date", which means find the child of the context node whose element name is current-date, and fails if there is no source document.

Michael Kay
Saxonica
http://iweb.dl.sourceforge.net/project/saxon/Saxon-HE/9.5/SaxonHE9-5-1-5J.zip
~/dwnlds/saxon/9.5
http://www.saxonica.com/documentation/#!about/gettingstarted/gettingstartedjava
however, this resulted in error messages which I (as a newbie) have no
~/dwnlds/saxon/9.5 $
/home/evansl/dwnlds/oracle/jdk_8_nb_8/install.dir/jdk1.8.0/bin/java -cp
./saxon9he.jar net.sf.saxon.Query -t -qs:current-date()
Saxon-HE 9.5.1.5J from Saxonica
Java version 1.8.0
Analyzing query from {current-date}
Analysis time: 394.15976 milliseconds
XPDY0002: The context item is absent
Query processing failed: Run-time errors were reported
What should I do to fix this problem?
TIA.
-regards,
Larry
------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
https://lists.sourceforge.net/lists/listinfo/saxon-help
Larry Evans
2014-03-30 14:27:49 UTC
Permalink
Post by Michael Kay
syntax error near unexpected token `('
-qs:"current-date()"
I suspect that your shell, for some reason, has passed an argument that omits the brackets, which means your query becomes "current-date", which means find the child of the context node whose element name is current-date, and fails if there is no source document.
Michael Kay
Saxonica
Yes. Thanks very much Michael:

~/dwnlds/saxon/9.5 $ java -cp ./saxon9he.jar net.sf.saxon.Query -t
-qs:"current-date()"
Saxon-HE 9.5.1.5J from Saxonica
Java version 1.6.0_30
Analyzing query from {current-date()}
Analysis time: 423.79328 milliseconds
<?xml version="1.0" encoding="UTF-8"?>2014-03-30-05:00Execution time:
181.049599ms
Memory used: 3683752
~/dwnlds/saxon/9.5 $
[snip]
Post by Michael Kay
http://www.saxonica.com/documentation/#!about/gettingstarted/gettingstartedjava
however, this resulted in error messages which I (as a newbie) have no
~/dwnlds/saxon/9.5 $
/home/evansl/dwnlds/oracle/jdk_8_nb_8/install.dir/jdk1.8.0/bin/java -cp
./saxon9he.jar net.sf.saxon.Query -t -qs:current-date()
Saxon-HE 9.5.1.5J from Saxonica
Java version 1.8.0
Analyzing query from {current-date}
Analysis time: 394.15976 milliseconds
XPDY0002: The context item is absent
Query processing failed: Run-time errors were reported
What should I do to fix this problem?
TIA.
-regards,
Larry
------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
Loading...