MarkLogic 12 EA 1 Product Documentation
fn.docAvailable

fn.docAvailable(
   uri as String?
) as Boolean

Summary

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.

Example

fn.docAvailable("/mydocs/doc.xml");

=> true is /mydocs/doc.xml is a document in the database,
   otherwise false
Powered by MarkLogic Server | Terms of Use | Privacy Policy