1
我想搜索CQ 5.6(AEM)實例中包含的包含給定字符串xxx
的所有.jsp
文件的JCR存儲庫。作爲JCR對XPath(或JCR-SQL2)解釋的新手,我在表達查詢方面不太成功。如何在jcr:content/@ jcr中搜索:使用JCR XPath的數據?
這將讓我的所有.jsp
文件:
//*[jcr:contains(., '.jsp')]
這是我怎麼會希望限制包含xxx
.jsp
文件上面的列表:
//*[jcr:contains(., '.jsp')][jcr:contains(jcr:content/@jcr:data, 'xxx')]
//*[jcr:contains(., '.jsp') and jcr:contains(jcr:content/@jcr:data, 'xxx')]
//*[jcr:contains(., '.jsp')]/jcr:content[jcr:contains(@jcr:data, 'xxx')]/..
@jcr:data
存在Binary
型。以上都不起作用。我哪裏錯了?
這它。解決方案是編寫'// * [jcr:contains(。,'.jsp')] [jcr:contains(jcr:content,'xxx')]'。雖然不是那麼直觀,但是... – 2013-04-24 13:16:10
...是的,我沒有想到querybuilder。思路不錯 – 2013-04-24 13:31:57
我試圖運行一個類似的查詢,但在JavaScript文件中搜索,但它不起作用,它應該是相同的情況,但我不明白爲什麼我得到零結果。 – ronnyfm 2016-06-27 17:26:19