【发布时间】:2012-08-18 02:12:20
【问题描述】:
我想知道一个 XML 文档是否已构建(例如,使用 xdmp:unquote)或已从数据库中检索。我尝试过的一种方法是检查 document-uri 属性
declare variable $doc as document-node() external;
if (fn:exists(fn:document-uri($doc))) then
'on database'
else
'in memory'
这似乎工作得很好,但我在 MarkLogic 文档中看不到任何保证这一点的内容。这种方法可靠吗?还有其他我应该使用的技术吗?
【问题讨论】: