<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.namespaceUriForPrefix.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.namespaceUriForPrefix</api:function-name><api:suggest>fn.namespaceuriforprefix</api:suggest><api:suggest>fn</api:suggest><api:suggest>namespaceuriforprefix</api:suggest><api:function-link mode="xquery" fullname="fn:namespace-uri-for-prefix">/apidoc/8.0/fn:namespace-uri-for-prefix.xml</api:function-link><api:function mode="javascript" name="namespaceUriForPrefix" type="builtin" lib="fn" category="QNameBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.namespaceUriForPrefix"><api:summary>
<p xmlns="http://www.w3.org/1999/xhtml">
  Returns the namespace URI of one of the in-scope namespaces for $element,
  identified by its namespace prefix.
</p><p xmlns="http://www.w3.org/1999/xhtml">
  If $element has an in-scope namespace whose namespace prefix is equal to
  $prefix, it returns the namespace URI of that namespace. If $prefix is the
  zero-length string or the empty sequence, it returns the namespace URI of
  the default (unnamed) namespace. Otherwise, it returns the empty sequence.
</p><p xmlns="http://www.w3.org/1999/xhtml">
  Prefixes are equal only if their Unicode code points match exactly.
</p>
</api:summary><api:params><api:param name="prefix" type="xs:string?"><api:param-description>
  A namespace prefix to look up.
  </api:param-description><api:param-name>prefix</api:param-name><api:param-type>String?</api:param-type></api:param><api:param name="element" type="element()"><api:param-description>
  An element node providing namespace context.
  </api:param-description><api:param-name>element</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 = xdmp.unquote(
  '&lt;ex:hello xmlns:ex="http://example.com/example"&gt;1&lt;/ex:hello&gt;');
var el = x.toArray()[0].xpath("/element()");
fn.namespaceUriForPrefix("ex", el);

=&gt; the namespace URI corresponding to
   "http://www.example.com/example".  
</pre></api:example></api:function></api:function-page>