fn.docAvailable( uri as String? ) as Boolean
If fn:doc($uri) returns a document node, this function returns true. If $uri is not a valid xs:anyURI, an error is raised [err:FODC0005]. Otherwise, this function returns false.
If this function returns true, then calling fn:doc($uri) within the same execution scope must return a document node.
Parameters | |
---|---|
uri | The URI of the document to check. |
fn.docAvailable("/mydocs/doc.xml"); => true is /mydocs/doc.xml is a document in the database, otherwise false
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.