这是失败的,我不确定它是xqilla的限制还是bug
xqilla -i file.xml <(echo "//abcd:case[@xyz:displayName='locate']/abcd:condition/text()")
/dev/fd/63:1:3: error: No namespace for prefix 'abcd' [err:XPST0081]但是,我可以让它与以下内容一起工作:
$ xqilla -i file.xml <(echo "//*:case[@*:displayName='locate']/*:condition/text()")
hello world在同一个上使用:
$ xidel file.xml --extract '//abcd:case[@xyz:displayName="locate"]/abcd:condition/text()'
**** Retrieving: x.bpel ****
**** Processing: x.bpel ****
hello world在同一个上使用:
$ xml sel -t -v '//abcd:case[@xyz:displayName="locate"]/abcd:condition/text()' file.xml
hello world如何使sqilla找到名称空间?
更新:我喜欢添加的,我是如何通过创建另一个文件为下面的sqilla工作的:
$ cat newfile
declare namespace xyz="http://www.ibm.com/xmlns/prod/websphere/business-process/6.0.0/";
declare namespace abcd="http://schemas.xmlsoap.org/ws/2004/03/business-process/";
doc("file.xml")//abcd:case[@xyz:displayName='locate']/abcd:condition/text()然后通过以下方式引用:
$ xqilla newfile
hello world那么,这是否应该适用于sqilla??
发布于 2017-03-17 18:32:29
它不起作用的原因是XQilla在名称空间方面非常敏感,因此出现了初始错误[err:XPST0081]。更多的命令行信息可以在comments=0上找到。
https://stackoverflow.com/questions/42797061
复制相似问题