希望运行
simplest
使用Saxon的可能示例,特别是,
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$
我不认为这是正确的进口声明,但我也不确定什么是正确的。仔细看一下这个样本,就会发现它正在使用
saxonica
实际上已经对导入进行了注释:
//import net.sf.saxon.xqj.SaxonXQDataSource;
如果要重新迭代,将希望留在
撒克逊河
. 但是如何呢?
从
build
文件:
compile (group = "net.sf.saxon" , name = "Saxon-HE" , version = "9.9.0-2")
坚持
撒克逊河
这是正确的导入?
此数据源与哪个数据源一起提供?
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$
我是否需要更多的编译依赖项?如果是,哪一个?