I added usebnodes=false argument to the command to avoid this error:
net.sf.saxon.s9api.SaxonApiException: No value supplied for required parameter usebnodes
at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:370)
at net.sf.saxon.Query.runQuery(Query.java:892)
at net.sf.saxon.Query.doQuery(Query.java:439)
at net.sf.saxon.Query.main(Query.java:111)
Caused by: net.sf.saxon.trans.XPathException: No value supplied for required parameter usebnodes
at net.sf.saxon.expr.instruct.Executable.checkAllRequiredParamsArePresent(Executable.java:727)
at net.sf.saxon.query.DynamicQueryContext.initializeController(DynamicQueryContext.java:419)
at net.sf.saxon.query.XQueryExpression.newController(XQueryExpression.java:716)
at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:376)
at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:368)
... 3 more
Fatal error during query: net.sf.saxon.s9api.SaxonApiException: No value supplied for required parameter usebnodes
I commented out calls to readlink as it is a utility that may not be installed on the machine running the script, or it may not have the -e or -f option (the problem on my mac).
The documentation could be changed to indicate absolute path is needed for the path args, or there may be another way to do this, such as something along these lines:
Two changes:
net.sf.saxon.s9api.SaxonApiException: No value supplied for required parameter usebnodes at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:370) at net.sf.saxon.Query.runQuery(Query.java:892) at net.sf.saxon.Query.doQuery(Query.java:439) at net.sf.saxon.Query.main(Query.java:111) Caused by: net.sf.saxon.trans.XPathException: No value supplied for required parameter usebnodes at net.sf.saxon.expr.instruct.Executable.checkAllRequiredParamsArePresent(Executable.java:727) at net.sf.saxon.query.DynamicQueryContext.initializeController(DynamicQueryContext.java:419) at net.sf.saxon.query.XQueryExpression.newController(XQueryExpression.java:716) at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:376) at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:368) ... 3 more Fatal error during query: net.sf.saxon.s9api.SaxonApiException: No value supplied for required parameter usebnodes
The documentation could be changed to indicate absolute path is needed for the path args, or there may be another way to do this, such as something along these lines:
echo $(cd $(dirname "$1") && pwd -P)/$(basename "$1")
per http://stackoverflow.com/questions/5265702/how-to-get-full-path-of-a-file See also http://stackoverflow.com/questions/3915040/bash-fish-command-to-print-absolute-path-to-a-file/21188136#21188136