Looking to run the simplest possible example using saxon, and, specifically, Saxon-HE
:
thufir@dur:~/NetBeansProjects/helloWorldSaxon$
thufir@dur:~/NetBeansProjects/helloWorldSaxon$ gradle clean run
> Task :compileJava FAILED
/home/thufir/NetBeansProjects/helloWorldSaxon/src/main/java/helloWorldSaxon/App.java:6: error: package com.saxonica.xqj does not exist
import com.saxonica.xqj.SaxonXQDataSource;
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
2 actionable tasks: 2 executed
thufir@dur:~/NetBeansProjects/helloWorldSaxon$
I don't think that's the right import statement, but neither am I sure what would be correct. A closer look at the sample reveals that it's using saxonica
and has actually commented out the import:
//import net.sf.saxon.xqj.SaxonXQDataSource;
To re-iterate, would want to stay within Saxon-HE
. But how?
From the build file:
compile (group = "net.sf.saxon" , name = "Saxon-HE" , version = "9.9.0-2")
Sticking to Saxon-HE
this is the correct import?
Which data source does this ship with?
thufir@dur:~/saxon$
thufir@dur:~/saxon$ jar tf Saxon-HE.jar | grep data
net/sf/saxon/data/
net/sf/saxon/data/analyze-string.xsd
net/sf/saxon/data/casevariants.xml
net/sf/saxon/data/categories.xml
net/sf/saxon/data/chameleon.xsl
net/sf/saxon/data/json.xsd
net/sf/saxon/data/normalizationData.xml
net/sf/saxon/data/override.xsl
net/sf/saxon/data/unicodeBlocks.xml
net/sf/saxon/data/xml-to-json-indent.xsl
net/sf/saxon/data/xml-to-json-pkg.xsl
net/sf/saxon/data/xml-to-json.xsl
net/sf/saxon/data/xpath-functions.scm
net/sf/saxon/data/xpath-functions.xsd
net/sf/saxon/resource/MetadataResource$1.class
net/sf/saxon/resource/MetadataResource.class
thufir@dur:~/saxon$
Do I need more compile dependencies? If so, which ones?