<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.docAvailable.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.docAvailable</api:function-name><api:suggest>fn.docavailable</api:suggest><api:suggest>fn</api:suggest><api:suggest>docavailable</api:suggest><api:function-link mode="xquery" fullname="fn:doc-available">/apidoc/8.0/fn:doc-available.xml</api:function-link><api:function mode="javascript" name="docAvailable" type="builtin" lib="fn" category="SequenceBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.docAvailable"><api:summary>
<p xmlns="http://www.w3.org/1999/xhtml">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.
</p>
<p xmlns="http://www.w3.org/1999/xhtml">If this function returns true, then calling fn:doc($uri) within the
same execution scope must return a document node.
</p>
</api:summary><api:params><api:param name="uri" type="xs:string?"><api:param-description>
The URI of the document to check.
  </api:param-description><api:param-name>uri</api:param-name><api:param-type>String?</api:param-type></api:param></api:params><api:return>Boolean</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
fn.docAvailable("/mydocs/doc.xml");

=&gt; true is /mydocs/doc.xml is a document in the database,
   otherwise false
</pre></api:example></api:function></api:function-page>