如何从撒克逊获取远程XML?
thufir@dur:~/saxon$
thufir@dur:~/saxon$ java -cp /usr/share/java/Saxon-HE.jar net.sf.saxon.Query fetch.note.text.xq
Static error on line 2 at column 2 of file:/home/thufir/saxon/fetch.note.text.xq near {...ww.w3schools.com/xml/note.x...}
XPST0081: Namespace prefix 'fetch' has not been declared
Static error(s) in query
thufir@dur:~/saxon$
thufir@dur:~/saxon$ cat fetch.note.text.xq
fetch:xml("https://www.w3schools.com/xml/note.xml", map { 'chop': true() })
thufir@dur:~/saxon$ 这是从BaseX开始的。
简单的问候世界运行好的:
thufir@dur:~/saxon$
thufir@dur:~/saxon$ java -cp /usr/share/java/Saxon-HE.jar net.sf.saxon.Query test.xq
<?xml version="1.0" encoding="UTF-8"?><results><message>Hello World!</message></results>thufir@dur:~/saxon$
thufir@dur:~/saxon$ 发布于 2019-01-02 19:44:42
使用标准的XPath函数,如doc('https://www.w3schools.com/xml/note.xml')。像BaseX的fetch这样的处理器特定模块通常是不可移植的。
https://stackoverflow.com/questions/54011147
复制相似问题