This is failing and I'm not sure if it's a limitation or a bug of xqilla:
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]
However, I can get it to work with:
$ xqilla -i file.xml <(echo "//*:case[@*:displayName='locate']/*:condition/text()")
hello world
Using xidel on the same file.xml:
$ xidel file.xml --extract '//abcd:case[@xyz:displayName="locate"]/abcd:condition/text()'
**** Retrieving: x.bpel ****
**** Processing: x.bpel ****
hello world
Using xmlstarlet on the same file.xml:
$ xml sel -t -v '//abcd:case[@xyz:displayName="locate"]/abcd:condition/text()' file.xml
hello world
How do I make sqilla find the namespace?
UPDATE: I like to add, how I made it to work for sqilla below by creating another file:
$ 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()
And then invoking it by:
$ xqilla newfile
hello world
So is that how it is supposed to work for sqilla??
The reason it's not working is because XQilla is very sensitive when it comes to namespaces - hence the initial error
[err:XPST0081]. More command line info can be found at http://xqilla.sourceforge.net/CommandLine?show_comments=0 .