<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.normalizeSpace.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.normalizeSpace</api:function-name><api:suggest>fn.normalizespace</api:suggest><api:suggest>fn</api:suggest><api:suggest>normalizespace</api:suggest><api:function-link mode="xquery" fullname="fn:normalize-space">/apidoc/8.0/fn:normalize-space.xml</api:function-link><api:function mode="javascript" name="normalizeSpace" type="builtin" lib="fn" category="StringBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.normalizeSpace"><api:summary>
 Returns the specified string with normalized whitespace, which strips off
 any leading or trailing whitespace and replaces any other sequences of
 more than one whitespace characters with a single space
 character (#x20).
</api:summary><api:params><api:param name="input" type="xs:string?" optional="true"><api:param-description>
  The string from which to normalize whitespace.
  </api:param-description><api:param-name>input</api:param-name><api:param-type>String?</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">
fn.normalizeSpace(" \n\
this \n\
is    \n\
  a string   \n\
  ");

=&gt; this is a string
</pre>
</api:example></api:function></api:function-page>