<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.baseUri.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.baseUri</api:function-name><api:suggest>fn.baseuri</api:suggest><api:suggest>fn</api:suggest><api:suggest>baseuri</api:suggest><api:function-link mode="xquery" fullname="fn:base-uri">/apidoc/8.0/fn:base-uri.xml</api:function-link><api:function mode="javascript" name="baseUri" type="builtin" lib="fn" category="AccessorBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.baseUri"><api:summary>
  Returns the value of the base-uri property for the specified node.  If the
  node is part of a document and does not have a base-uri attribute explicitly
  set, <code xmlns="http://www.w3.org/1999/xhtml">fn:base-uri</code> typically  returns the URI of the document
  in which the node resides.
</api:summary><api:params><api:param name="arg" type="node()?" optional="true"><api:param-description>
   The node whose base-uri is to be returned.
  </api:param-description><api:param-name>arg</api:param-name><api:param-type>Node?</api:param-type></api:param></api:params><api:return>String?</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var x = cts.doc("/bar.json");
fn.baseUri(x);

=&gt; "/bar.json"
</pre></api:example></api:function></api:function-page>