1
我在以下集合中不存在-DB XML文件:查詢集合
- /DB/OCR/Everest_Bank /(XML文件在這裏)
- /DB/OCR/Siddhartha_Bank /(XML文件在這裏)
- /DB/OCR/ABC_Bank /(XML文件在這裏)
我想運行在所有的 「銀行」 的/ DB/OCR集合中的XQuery滿足條件並想要返回滿足條件的銀行的名稱。我寫了一個查詢,但卡在FLWOR表達式的返回部分。
declare default element namespace 'http://www.xbrl.org/2003/instance';
declare namespace ifrs = 'http://xbrl.ifrs.org/taxonomy/2013-03-28/ifrs';
for $x in collection("/db/OCR")
let $z := $x/xbrl/ifrs:Assets (: want to have query in assets of all files in the banks :)
return
if (exists($z) and xs:integer($z/text())>9999999)
then ???
現在我該如何返回符合我的條件的結果的集合名稱,如「Everest_Bank」?請幫忙。
謝謝你。它通過獲得滿足條件的文件以及文檔 - uri來解決我的問題。現在我可以做的是砍掉其餘部分並獲取銀行名稱。 +1再次感謝。 – Pant