无法为 xquery 文档加载命名空间http://expath.org/ns/http-client :
java -ea -cp ./saxon9.jar net.sf.saxon.Query -mr:"http://expath.org/ns/http-client" -q:'tester.xq'
在 tester.xq 中发送请求的代码:
let $request :=
<http:request href='http://localhost:8080/domestic-test'
method='post'>
<http:multipart media-type='multipart/form-data' boundary='--A0Bce'>
<http:body media-type='application/xml'>
<query xmlns="http://basex.org/rest">
<text><![CDATA[
<html>{
for $i in 1 to 3
return <div>Section {$i }</div>
}</html>
]]></text>
</query>
</http:body>
</http:multipart>
</http:request>
return http:send-request($request)
如何使用命令行 linux 导入模块以运行 xquery 文件???