<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.tidy.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.tidy</api:function-name><api:suggest>xdmp.tidy</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>tidy</api:suggest><api:function-link mode="xquery" fullname="xdmp:tidy">/apidoc/8.0/xdmp:tidy.xml</api:function-link><api:function mode="javascript" name="tidy" type="builtin" lib="xdmp" category="Document Conversion" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.tidy"><api:summary>
  Run tidy on the specified html document to convert the document to
  well-formed and clean XHTML.  Returns two nodes: the first is a status
  node indicating any errors or warning from tidy, and the second is an
  html node containing the cleaned xhtml.
</api:summary><api:params><api:param name="doc" type="xs:string" optional="false"><api:param-description>
    A string representing the html document you want to tidy.
  </api:param-description><api:param-name>doc</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="options" type="(element()|map:map)?" optional="true"><api:param-description>

    The options 
                <span class="javascript" xmlns="http://www.w3.org/1999/xhtml">object</span>
    for this operation. 

    The default value is <code xmlns="http://www.w3.org/1999/xhtml">
    <span class="javascript">null</span></code>.

  The options are based on the open source HTML Tidy configuration options,
  available at <a href="http://tidy.sourceforge.net/docs/quickref.html" target="_blank" xmlns="http://www.w3.org/1999/xhtml">http://tidy.sourceforge.net/docs/quickref.html</a>.
  Most of the tidy options are available through <code xmlns="http://www.w3.org/1999/xhtml">
  <span class="javascript">xdmp.tidy</span></code>
  with the following exceptions:
  <ul xmlns="http://www.w3.org/1999/xhtml"><li>The character encoding for the output is always UTF-8.</li><li>The filesystem options which allow you to specify where to save output
        are not supported (although there are many ways to achieve this through
        functions such as <code>
        <span class="javascript">xdmp.save</span></code>).</li><li>The output is always XHTML.</li><li>Entities except for the built-in HTML entities will be always be
        output in numeric form.</li></ul>
    <p xmlns="http://www.w3.org/1999/xhtml">Options include:</p>
    <blockquote xmlns="http://www.w3.org/1999/xhtml"><dl>
    <dt><h4>HTML, XHTML, and XML Options</h4>
    <p>
    <span class="javascript"><code>addXmlDecl</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description: This option specifies if Tidy should add the XML
    declaration when outputting XML or XHTML. Note that if the input
    already includes an <code>&lt;?xml ... ?&gt;</code> declaration then
    this option will be ignored.</dd>

    <dt><p>
    <span class="javascript"><code>addXmlSpace</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description: This option specifies if Tidy should add
    <code>xml:space="preserve"</code> to elements such as &lt;PRE&gt;,
    &lt;STYLE&gt; and &lt;SCRIPT&gt; when generating XML. This is needed if
    the whitespace in such elements is to be parsed appropriately without
    having access to the DTD.</dd>

    <dt><p>
    <span class="javascript"><code>altText</code></span></p></dt>
    <dd>Default Value: n/a<br/><br/><br/>
    Description: This option specifies the default "alt=" text Tidy uses
    for &lt;IMG&gt; attributes. This feature is dangerous as it suppresses
    further accessibility warnings. You are responsible for making your
    documents accessible to people who can not see the images!</dd>

    <dt><p>
    <span class="javascript"><code>assumeXmlProcins</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description: This option specifies if Tidy should change the parsing
    of processing instructions to require ?&gt; as the terminator rather
    than &gt;. This option is automatically set if the input is in XML.</dd>

    <dt><p>
    <span class="javascript"><code>bare</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description: This option specifies if Tidy should strip Microsoft specific
    HTML from Word 2000 documents, and output spaces rather than
    non-breaking spaces where they exist in the input.</dd>

    <dt><p>
    <span class="javascript"><code>clean</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:  This option specifies if Tidy should strip out surplus
    presentational tags and attributes replacing them by style rules and
    structural markup as appropriate. It works well on the HTML saved by
    Microsoft Office products.
    </dd>

    <dt><p>
    <span class="javascript"><code>cssPrefix</code></span></p></dt>
    <dd>Default Value: n/a<br/><br/>
    Description: This option specifies the prefix that Tidy uses for styles
    rules. By default, "c" will be used.</dd>

    <dt><p>
    <span class="javascript"><code>doctype</code></span></p></dt>
    <dd>Default Value: <code>auto</code><br/><br/>
    Possible Values: <code>auto</code>, <code>omit</code>, <code>strict</code>,
    <code>loose</code>, <code>transitional</code>, or user-specified fpi string
    <br/><br/>
    Description:
    This option specifies the DOCTYPE declaration generated by Tidy.
    If set to <code>omit</code> the output won't contain a DOCTYPE declaration.
    If set to <code>auto</code> (the default) Tidy will use an educated
    guess based upon the contents of the document. If set to
    <code>strict</code>,
    Tidy will set the DOCTYPE to the strict DTD. If set to <code>loose</code>,
    the DOCTYPE is set to the loose (transitional) DTD. Alternatively, you can
    supply a string for the formal public identifier (FPI).  For example:
    <br/><br/><code> doctype: "-//ACME//DTD HTML 3.14159//EN"</code> <br/>
    <br/> If you specify the FPI for an XHTML document, Tidy will set the
    system identifier to the empty string. Tidy leaves the DOCTYPE for
    generic XML documents unchanged. Specifying a doctype of <code>omit</code>
    implies that the numeric-entities option is set to <code>yes</code>.
    </dd>

    <dt><p>
    <span class="javascript"><code>dropEmptyParas</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should discard empty paragraphs. If
    set to no, empty paragraphs are replaced by a pair of &lt;BR&gt;
    elements as HTML4 precludes empty paragraphs.</dd>

    <dt><p>
    <span class="javascript"><code>dropFontTags</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should discard &lt;FONT&gt;
    and &lt;CENTER&gt; tags without creating the corresponding
    style rules. This option can be set independently of the clean option.
    </dd>

    <dt><p>
    <span class="javascript"><code>dropProprietaryAttributes</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should strip out proprietary attributes,
    such as MS data binding attributes.</dd>

    <dt><p>
    <span class="javascript"><code>encloseBlockText</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should insert a &lt;P&gt; element to enclose
    any text it finds in any element that allows mixed content for HTML
    transitional but not HTML strict.</dd>

    <dt><p>
    <span class="javascript"><code>encloseText</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should enclose any text it finds in
    the body element within a &lt;P&gt; element. This is useful when you want
    to take existing HTML and use it with a style sheet.</dd>

    <dt><p>
    <span class="javascript"><code>escapeCdata</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should convert &lt;![CDATA[]]&gt;
    sections to normal text.</dd>

    <dt><p>
    <span class="javascript"><code>fixBackslash</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should replace backslash characters
    "\" in URLs by forward slashes "/".</dd>

    <dt><p>
    <span class="javascript"><code>fixBadComments</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should replace unexpected hyphens
    with "=" characters when it comes across adjacent hyphens. The
    default is yes. This option is provided for users of Cold Fusion
    which uses the comment syntax: &lt;!--- ---&gt;</dd>

    <dt><p>
    <span class="javascript"><code>fixUri</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should check attribute values that carry
    URIs for illegal characters and if such are found, escape them as
    HTML 4 recommends.</dd>

    <dt><p>
    <span class="javascript"><code>hideComments</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should print out comments.</dd>

    <dt><p>
    <span class="javascript"><code>hideEndtags</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should omit optional end-tags when
    generating the pretty printed markup. This option is ignored if
    you are outputting to XML.</dd>

    <dt><p>
    <span class="javascript"><code>indentCdata</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should indent &lt;![CDATA[]]&gt;
    sections.</dd>

    <dt><p>
    <span class="javascript"><code>inputXml</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should use the XML parser rather than
    the error correcting HTML parser.</dd>

    <dt><p>
    <span class="javascript"><code>joinClasses</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should combine class names to generate a
    single new class name, if multiple class assignments are detected on
    an element.</dd>

    <dt><p>
    <span class="javascript"><code>joinStyles</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should combine styles to generate a
    single new style, if multiple style values are detected on an element.</dd>

    <dt><p>
    <span class="javascript"><code>literalAttributes</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should ensure that whitespace characters
    within attribute values are passed through unchanged.</dd>

    <dt><p>
    <span class="javascript"><code>logicalEmphasis</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should replace any occurrence of &lt;I&gt;
    by &lt;EM&gt; and any occurrence of &lt;B&gt; by &lt;STRONG&gt;. In both
    cases, the attributes are preserved unchanged. This option can be set
    independently of the clean and drop-font-tags options.</dd>

    <dt><p>
    <span class="javascript"><code>lowerLiterals</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should convert the value of an attribute
    that takes a list of predefined values to lower case. This is required for
    XHTML documents.</dd>

    <dt><p>
    <span class="javascript"><code>mergeDivs</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    Can be used to modify behavior of setting the <code>clean</code> option
    to <code>yes</code>. This option specifies if Tidy should merge
    nested &lt;div&gt; such as
    <code>&lt;div&gt;&lt;div&gt;...&lt;/div&gt;&lt;/div&gt;</code>.</dd>

    <dt><p>
    <span class="javascript"><code>ncr</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should allow numeric character
    references.</dd>

    <dt><p>
    <span class="javascript"><code>newBlocklevelTags</code></span></p></dt>
    <dd>Default Value: none<br/><br/>
    Description:
    This option specifies new block-level tags. This option takes a space or
    comma separated list of tag names. Unless you declare new tags, Tidy will
    refuse to generate a tidied file if the input includes previously unknown
    tags. Note you can't change the content model for elements such
    as &lt;TABLE&gt;, &lt;UL&gt;, &lt;OL&gt; and &lt;DL&gt;.</dd>

    <dt><p>
    <span class="javascript"><code>newEmptyTags</code></span></p></dt>
    <dd>Default Value: none<br/><br/>
    Description:
    This option specifies new empty inline tags. This option takes a space
    or comma separated list of tag names. Unless you declare new tags, Tidy
    will refuse to generate a tidied file if the input includes previously
    unknown tags. Remember to also declare empty tags as either inline or
    blocklevel.</dd>

    <dt><p>
    <span class="javascript"><code>newInlineTags</code></span></p></dt>
    <dd>Default Value: none<br/><br/>
    Description:
    This option specifies new non-empty inline tags. This option takes a
    space or comma separated list of tag names. Unless you declare new tags,
    Tidy will refuse to generate a tidied file if the input includes
    previously unknown tags.
    </dd>

    <dt><p>
    <span class="javascript"><code>newPreTags</code></span></p></dt>
    <dd>Default Value: none<br/><br/>
    Description:
    This option specifies new tags that are to be processed in exactly the
    same way as HTML's &lt;PRE&gt; element. This option takes a space or
    comma separated list of tag names. Unless you declare new tags, Tidy
    will refuse to generate a tidied file if the input includes previously
    unknown tags. Note you can not as yet add new CDATA elements (similar
    to &lt;SCRIPT&gt;).</dd>

    <dt><p>
    <span class="javascript"><code>numericEntities</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should output entities other than the
    built-in HTML entities (&amp;, &lt;, &gt; and ") in the numeric
    rather than the named entity form.
    </dd>

    <dt><p>
    <span class="javascript"><code>outputHtml</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should generate pretty printed output,
    writing it as HTML.</dd>

    <dt><p>
    <span class="javascript"><code>outputXhtml</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should generate pretty printed output,
    writing it as extensible HTML. This option causes Tidy to set the
    DOCTYPE and default namespace as appropriate to XHTML. If a DOCTYPE or
    namespace is given they will checked for consistency with the content
    of the document. In the case of an inconsistency, the corrected values
    will appear in the output. For XHTML, entities can be written as named
    or numeric entities according to the setting of the
    <code>numeric-entities</code> option. The original case of tags and
    attributes will be preserved, regardless of other options.
    </dd>

    <dt><p>
    <span class="javascript"><code>outputXml</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should pretty print output, writing it as
    well-formed XML. Any entities not defined in XML 1.0 will be written
    as numeric entities to allow them to be parsed by a XML parser. The
    original case of tags and attributes will be preserved, regardless
    of other options.
    </dd>

    <dt><p>
    <span class="javascript"><code>quoteAmpersand</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should output unadorned &amp; characters
    as &amp;#38;.</dd>

     <dt><p>
    <span class="javascript"><code>quoteMarks</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should output " characters as " as
    is preferred by some editing environments. The apostrophe character '
    is written out as &amp;#39; since many web browsers don't yet
    support &amp;#39;.</dd>

     <dt><p>
    <span class="javascript"><code>quoteNbsp</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should output non-breaking space characters
    as entities, rather than as the Unicode character value 160 (decimal).</dd>

    <dt><p>
    <span class="javascript"><code>repeatedAttributes</code></span></p></dt>
    <dd>Default Value: <code>keep-last</code><br/><br/>
    Possible Values:<code>keep-first</code>, <code>keep-last</code><br/><br/>
    Description:
    This option specifies if Tidy should keep the first or last attribute,
    if an attribute is repeated (for example, if a tag has has two
    <code>align</code> attributes.</dd>

    <dt><p>
    <span class="javascript"><code>replaceColor</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should replace numeric values in color
    attributes by HTML/XHTML color names where defined, e.g. replace
    "#ffffff" with "white".</dd>

    <dt><p>
    <span class="javascript"><code>showBodyOnly</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should print only the contents of the body
    tag as an HTML fragment. Useful for incorporating existing whole pages
    as a portion of another page.
    </dd>

    <dt><p>
    <span class="javascript"><code>uppercaseAttributes</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should output attribute names in upper case.
    The default is no, which results in lower case attribute names, except
    for XML input, where the original case is preserved.
    </dd>

    <dt><p>
    <span class="javascript"><code>uppercaseTags</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should output tag names in upper case.
    The default is no, which results in lower case tag names, except for
    XML input, where the original case is preserved.
    </dd>

    <dt><p>
    <span class="javascript"><code>word2000</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should go to great pains to strip out all
    the surplus stuff Microsoft Word 2000 inserts when you save Word
    documents as "Web pages". Doesn't handle embedded images or VML.</dd>

    <dt><h4>Diagnostic Options</h4>
    <p>
    <span class="javascript"><code>accessibilityCheck</code></span></p></dt>
    <dd>Default Value: 0<br/><br/>
    Possible Values: 0, 1, 2, or 3<br/><br/>
    Description:
    This option specifies what level of accessibility checking, if any,
    that Tidy should do. Level 0 is equivalent to Tidy Classic's
    accessibility checking.  For more information on Tidy's accessibility
    checking, see the web site for the
    <a href="http://www.aprompt.ca/Tidy/accessibilitychecks.html">
    Adaptive Technology Resource Centre at the University of Toronto</a>.
    </dd>

    <dt><p>
    <span class="javascript"><code>showErrors</code></span></p></dt>
    <dd>Default Value: <code>6</code><br/><br/>
    Possible Values: Any integer.  <br/><br/>
    Description:
    This option specifies the number Tidy uses to determine if further
    errors should be shown. If set to 0, then no errors are shown. </dd>

    <dt><p>
    <span class="javascript"><code>showWarnings</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should suppress warnings. This is
    useful when a few errors are hidden between many warning messages.</dd>

    <dt><h4>Pretty Print Options</h4>
    <p>
    <span class="javascript"><code>breakBeforeBr</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should output a line break before each
    &lt;BR&gt; element.</dd>

    <dt><p>
    <span class="javascript"><code>indent</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Possible Values: <code>no</code>, <code>yes</code>, <code>auto</code> <br/>
    <br/>
    Description:
    This option specifies if Tidy should indent block-level tags. If set
    to <code>auto</code>, this option causes Tidy to decide whether or not
    to indent the content of tags such as TITLE, H1-H6, LI, TD, TD, or P
    depending on whether or not the content includes a block-level element.
    You are advised to avoid setting indent to <code>yes</code> as this
    can expose layout bugs in some browsers.</dd>

    <dt><p>
    <span class="javascript"><code>indentAttributes</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should begin each attribute on a new
    line.</dd>

    <dt><p>
    <span class="javascript"><code>indentSpaces</code></span></p></dt>
    <dd>Default Value: <code>2</code><br/><br/>
    Possible Values: Any integer.<br/><br/>
    Description:
    This option specifies the number of spaces Tidy uses to indent content,
    when indentation is enabled.</dd>

    <dt><p>
    <span class="javascript"><code>markup</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should generate a pretty printed version
    of the markup. Note that Tidy won't generate a pretty printed version
    if it finds significant errors (see force-output).</dd>

    <dt><p>
    <span class="javascript"><code>punctuationWrap</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should line wrap after some Unicode or
    Chinese punctuation characters.</dd>

    <dt><p>
    <span class="javascript"><code>split</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should create a sequence of slides from
    the input, splitting the markup prior to each successive &lt;H2&gt;.
    The slides are written to "slide001.html", "slide002.html" etc.</dd>

    <dt><p>
    <span class="javascript"><code>tabSize</code></span></p></dt>
    <dd>Default Value: 8<br/><br/>
    Possible Values: Any integer.<br/><br/>
    Description:
    This option specifies the number of columns that Tidy uses between
    successive tab stops. It is used to map tabs to spaces when reading
    the input. Tidy never outputs tabs.</dd>

    <dt><p>
    <span class="javascript"><code>verticalSpace</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should add some empty lines for
    readability.</dd>

    <dt><p>
    <span class="javascript"><code>wrap</code></span></p></dt>
    <dd>Default Value: 68<br/><br/>
    Possible Values: Any integer.<br/><br/>
    Description:
    This option specifies the right margin Tidy uses for line wrapping.
    Tidy tries to wrap lines so that they do not exceed this length.
    Set wrap to zero if you want to disable line wrapping.</dd>

    <dt><p>
    <span class="javascript"><code>wrapAsp</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should line wrap text contained within
    ASP pseudo elements, which look as follows:<br/>
    <code>&lt;% ... %&gt;</code>.</dd>

    <dt><p>
    <span class="javascript"><code>wrapAttributes</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should line wrap attribute values,
    for easier editing. This option can be set independently of
    wrap-script-literals.
    </dd>

    <dt><p>
    <span class="javascript"><code>wrapJste</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should line wrap text contained within
    JSTE pseudo elements, which look as follows: <br/>
    <code>&lt;# ... #&gt;</code>.</dd>

    <dt><p>
    <span class="javascript"><code>wrapPhp</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should line wrap text contained within
    PHP pseudo elements, which look as follows: <br/>
    <code>&lt;?php ... ?&gt;</code>.</dd>

    <dt><p>
    <span class="javascript"><code>wrapScriptLiterals</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should line wrap string literals that
    appear in script attributes. Tidy wraps long script string literals
    by inserting a backslash character before the line break.</dd>

    <dt><p>
    <span class="javascript"><code>wrapSections</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should line wrap text contained
    within <code>&lt;![ ... ]&gt;</code> section tags.</dd>

    <dt><h4>Miscellaneous Options</h4>
    <p>
    <span class="javascript"><code>forceOutput</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should produce output even if errors
    are encountered. Use this option with care - if Tidy reports an error,
    this means Tidy was not able to, or is not sure how to, fix the
    error, so the resulting output may not be what you expect.</dd>

    <dt><p>
    <span class="javascript"><code>keepTime</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should keep the original modification
    time of files that Tidy modifies in place. The default is no. Setting
    the option to yes allows you to tidy files without causing these files
    to be uploaded to a web server when using a tool such as SiteCopy.
    Note this feature is not supported on some platforms.</dd>

    <dt><p>
    <span class="javascript"><code>quiet</code></span></p></dt>
    <dd>Default Value: <code>no</code><br/><br/>
    Description:
    This option specifies if Tidy should output the summary of the
    numbers of errors and warnings, or the welcome or
    informational messages.</dd>

    <dt><p>
    <span class="javascript"><code>tidyMark</code></span></p></dt>
    <dd>Default Value: <code>yes</code><br/><br/>
    Description:
    This option specifies if Tidy should add a meta element to the
    document head to indicate that the document has been tidied.
    Tidy won't add a meta element if one is already present.</dd>
    </dl>
    </blockquote>

  </api:param-description><api:param-name>options</api:param-name><api:param-type>Object?</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var html = "
&lt;htm&gt;
 &lt;h1&gt;This is a heading 1
 &lt;p&gt;This is paragraph tag
";

xdmp.tidy(html, {});

=&gt; a tidy-status node with any errors and warnings and
   an html node containing the clean and well-formed XHTML.

</pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.tidy(xdmp.documentGet("/space/test.html",
               {'format':'text'}),
     {'outputXhtml':'yes'}).toArray()[1]

=&gt;
The html document from the filesystem converted to xhtml
</pre></api:example></api:function></api:function-page>