<apidoc:module name="OfficeConvert" category="Document Conversion" lib="xdmp" xmlns:apidoc="http://marklogic.com/xdmp/apidoc"><apidoc:summary access="public">
  <p xmlns="http://www.w3.org/1999/xhtml">Includes the Microsoft Office convert functions using the AntennaHouse 
  technology.</p>
</apidoc:summary><apidoc:function name="word-convert" type="builtin" lib="xdmp" category="Document Conversion" hidden="false" bucket="MarkLogic Built-In Functions">
    <apidoc:summary>
  Converts a Microsoft Word document to XHTML. Returns several nodes,
  including a parts node, the converted document xml node, and any 
  other document parts (for example, css files and images).  The first 
  node is the parts node, which contains a manefest of all of the parts 
  generated as result of the conversion.  Does not convert Microsoft Office
  2007 documents. 
</apidoc:summary>
    <apidoc:params>
      <apidoc:param name="doc" type="node()" optional="false">
  Microsoft Word document to convert to HTML, as binary node().
  </apidoc:param>
      <apidoc:param name="filename" type="xs:string" optional="false">
    The root for the name of the converted files and directories. If the
    specified filename includes an extension, then the extension is appended
    to the root with an underscore. The directory for other parts of the
    conversion (images, for example) has the string "_parts" appended to the
    root. For example, if you specify a filename of "myFile.doc", the
    generated names will be "myFile_doc.xhtml" for the xml node and
    "myFile_doc_parts" for the directory containing the any other parts
    generated by the conversion (images, css files, and so on).   
  </apidoc:param>
      <apidoc:param name="options" type="node()?" optional="true">
    Options element for this conversion.  The options element must be in the
    <code xmlns="http://www.w3.org/1999/xhtml">xdmp:word-convert</code> namespace. The default value is (). In 
    addition to the options shown below, you can specify <code xmlns="http://www.w3.org/1999/xhtml">xdmp:tidy</code>
    options by entering the tidy option elements in the <code xmlns="http://www.w3.org/1999/xhtml">xdmp:tidy</code> 
    namespace.
    <p xmlns="http://www.w3.org/1999/xhtml">Options include:</p>
    <blockquote xmlns="http://www.w3.org/1999/xhtml"><dl>
    <dt><p>&lt;tidy&gt;</p></dt>
    <dd>Specify <code>true</code> to run tidy on the document and 
    <code>false</code> not to run tidy. If you run tidy, you can also 
    specify any <a href="#xdmp:tidy">xdmp:tidy options</a>. Any tidy option 
    elements must be in the <code>xdmp:tidy</code> namespace.</dd>
    <dt><p>&lt;compact&gt;</p></dt><dd>Specify <code>true</code> to produce
    "compact" HTML, that is, without style information. The default is
    <code>false</code>.</dd>
    <dt><p>Sample Options Node:</p></dt>
    <dd>The following is a sample options node which specifies that tidy is
    used to clean the generated html and specifies to use the tidy "clean" 
    option for the conversion:
    <pre xml:space="preserve">
&lt;options xmlns="xdmp:word-convert"
         xmlns:tidy="xdmp:tidy"&gt;
  &lt;tidy&gt;true&lt;/tidy&gt;
  &lt;tidy:clean&gt;yes&lt;/tidy:clean&gt;
&lt;/options&gt;
</pre></dd>
    </dl>
    </blockquote>
  </apidoc:param>
    </apidoc:params>
    <apidoc:return>node()*</apidoc:return>
    <apidoc:usage>
  The convert functions return several nodes.  The first node is a manifest
  containing the various parts of the conversion. Typically there will be
  an xml part, a css part, and some image parts.  Each part is returned as
  a separate node in the order shown in the manifest. 
  <p xmlns="http://www.w3.org/1999/xhtml">Therefore, given the following manifest: </p>
  <pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
&lt;parts&gt;
  &lt;part&gt;myFile_doc.xhtml&lt;/part&gt;
  &lt;part&gt;myFile_doc_parts/conv.css&lt;/part&gt;
  &lt;part&gt;myFile_doc_parts/toc.xml&lt;/part&gt;
&lt;/parts&gt;
</pre>
  <p xmlns="http://www.w3.org/1999/xhtml">the first node of the returned query is the manifest, the second is the 
  "myFile_doc.xhtml" node, the third is the "myFile_doc_parts/conv.css" node, 
  and the fourth is the myFile_doc_parts/toc.xml node.</p>
  
</apidoc:usage>
    <apidoc:example><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
let $results := xdmp:word-convert( 
                         xdmp:document-get("myFile.doc"),
                         "myFile.doc" ),
    $manifest := $results[1]
return 
$results[2 to last()]

=&gt; all of the converted nodes
</pre></apidoc:example>
  </apidoc:function><apidoc:function name="excel-convert" type="builtin" lib="xdmp" category="Document Conversion" hidden="false" bucket="MarkLogic Built-In Functions">
    <apidoc:summary>
  Converts a Microsoft Excel document to XHTML. Returns several nodes,
  including a parts node, the converted document xml node, and any 
  other document parts (for example, css files and images).  The first 
  node is the parts node, which contains a manefest of all of the parts 
  generated as result of the conversion.  Does not convert Microsoft Office
  2007 documents. 
</apidoc:summary>
    <apidoc:params>
      <apidoc:param name="doc" type="node()" optional="false">
    Microsoft Office Excel document to convert to HTML, as binary node().
  </apidoc:param>
      <apidoc:param name="filename" type="xs:string" optional="false">
    The root for the name of the converted files and directories. If the
    specified filename includes an extension, then the extension is appended
    to the root with an underscore. The directory for other parts of the
    conversion (images, for example) has the string "_parts" appended to the
    root. For example, if you specify a filename of "myFile.xls", the
    generated names will be "myFile_xls.xhtml" for the xml node and
    "myFile_xls_parts" for the directory containing the any other parts
    generated by the conversion (images, css files, and so on).   
  </apidoc:param>
      <apidoc:param name="options" type="node()?" optional="true">
    Options element for this conversion.  The options element must be in the
    <code xmlns="http://www.w3.org/1999/xhtml">xdmp:excel-convert</code> namespace. The default value is (). In 
    addition to the options shown below, you can specify <code xmlns="http://www.w3.org/1999/xhtml">xdmp:tidy</code>
    options by entering the tidy option elements in the <code xmlns="http://www.w3.org/1999/xhtml">xdmp:tidy</code> 
    namespace.
    <p xmlns="http://www.w3.org/1999/xhtml">Options include:</p>
    <blockquote xmlns="http://www.w3.org/1999/xhtml"><dl>
    <dt><p>&lt;tidy&gt;</p></dt>
    <dd>Specify <code>true</code> to run tidy on the document and 
    <code>false</code> not to run tidy. If you run tidy, you can also 
    specify an <a href="#xdmp:tidy"> xdmp:tidy options node</a>.</dd>
    <dt><p>&lt;sheetID&gt;</p></dt>
    <dd>An integer specifying which sheet of the input Excel document 
    to convert. If this option is not set, all sheets are converted. </dd>
    <dt><p>&lt;compact&gt;</p></dt><dd>Specify <code>true</code> to produce
    "compact" HTML, that is, without style information. The default is
    <code>false</code>.</dd>
    <dt><p>&lt;print-area-only&gt;</p></dt><dd>Specify <code>true</code> 
    to convert only the print area of the sheet.</dd>
    <dt><p>&lt;sheet-by-sheet&gt;</p></dt><dd>Specify <code>true</code> to produce
    one document for each sheet.  The default is <code>false</code>.</dd>
    <dt><p>Sample Options Node:</p></dt>
    <dd>The following is a sample options node which specifies that tidy is
    used to clean the generated html, specifies to use the tidy "clean" 
    option, and specifies to only convert sheet 2 of the document:
    <pre xml:space="preserve">
&lt;options xmlns="xdmp:excel-convert"
         xmlns:tidy="xdmp:tidy"&gt;
  &lt;tidy&gt;true&lt;/tidy&gt;
  &lt;tidy:clean&gt;yes&lt;/tidy:clean&gt;
  &lt;sheetID&gt;2&lt;/sheetID&gt;
&lt;/options&gt;
</pre></dd>
    </dl>
    </blockquote>
  </apidoc:param>
    </apidoc:params>
    <apidoc:return>node()*</apidoc:return>
    <apidoc:usage>
  The convert functions return several nodes.  The first node is a manifest
  containing the various parts of the conversion. Typically there will be
  an xml part, a css part, and some image parts.  Each part is returned as
  a separate node in the order shown in the manifest. 
  <p xmlns="http://www.w3.org/1999/xhtml">Therefore, given the following manifest: </p>
  <pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
&lt;parts&gt;
  &lt;part&gt;myFile_xls.xhtml&lt;/part&gt;
  &lt;part&gt;myFile_xls_parts/conv.css&lt;/part&gt;
  &lt;part&gt;myFile_xls_parts/toc.xml&lt;/part&gt;
&lt;/parts&gt;
</pre>
  <p xmlns="http://www.w3.org/1999/xhtml">the first node of the returned query is the manifest, the second is the 
  "myFile_xls.xhtml" node, the third is the "myFile_xls_parts/conv.css" node, 
  and the fourth is the myFile_xls_parts/toc.xml node.</p>
  
</apidoc:usage>
    <apidoc:example><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
let $results := xdmp:excel-convert( 
                         xdmp:document-get("myFile.xls"),
                         "myFile.xls" ),
    $manifest := $results[1]
return 
$results[2 to last()]

=&gt; all of the converted nodes
</pre></apidoc:example>
  </apidoc:function><apidoc:function name="powerpoint-convert" type="builtin" lib="xdmp" category="Document Conversion" hidden="false" bucket="MarkLogic Built-In Functions">
    <apidoc:summary>
  Converts a Microsoft Powerpoint document to XHTML. Returns several nodes,
  including a parts node, the converted document xml node, and any 
  other document parts (for example, css files and images).  The first 
  node is the parts node, which contains a manefest of all of the parts 
  generated as result of the conversion.  Does not convert Microsoft Office
  2007 documents. 
</apidoc:summary>
    <apidoc:params>
      <apidoc:param name="doc" type="node()" optional="false">
    Microsoft Powerpoint document to convert to HTML, as binary node().
  </apidoc:param>
      <apidoc:param name="filename" type="xs:string" optional="false">
    The root for the name of the converted files and directories. If the
    specified filename includes an extension, then the extension is appended
    to the root with an underscore. The directory for other parts of the
    conversion (images, for example) has the string "_parts" appended to the
    root. For example, if you specify a filename of "myFile.ppt", the
    generated names will be "myFile_ppt.xhtml" for the xml node and
    "myFile_ppt_parts" for the directory containing the any other parts
    generated by the conversion (images, css files, and so on).   
  </apidoc:param>
      <apidoc:param name="options" type="node()?" optional="true">
    Options element for this conversion.  The options element must be in the
    <code xmlns="http://www.w3.org/1999/xhtml">xdmp:powerpoint-convert</code> namespace. The default value is (). In 
    addition to the options shown below, you can specify <code xmlns="http://www.w3.org/1999/xhtml">xdmp:tidy</code>
    options by entering the tidy option elements in the <code xmlns="http://www.w3.org/1999/xhtml">xdmp:tidy</code> 
    namespace.
    <p xmlns="http://www.w3.org/1999/xhtml">Options include:</p>
    <blockquote xmlns="http://www.w3.org/1999/xhtml"><dl>
    <dt><p>&lt;tidy&gt;</p></dt>
    <dd>Specify <code>true</code> to run tidy on the document and 
    <code>false</code> not to run tidy. If you run tidy, you can also 
    specify an <a href="#xdmp:tidy">xdmp:tidy options node</a>.</dd>
    <dt><p>&lt;compact&gt;</p></dt><dd>Specify <code>true</code> to produce
    "compact" HTML, that is, without style information. The default is
    <code>false</code>.</dd>
    <dt><p>&lt;slideID&gt;</p></dt>
    <dd>An integer specifying which slide of the input Powerpoint document 
    to convert. If this option is not set, all slides are converted. </dd>
    <dt><p>&lt;slide-by-slide&gt;</p></dt><dd>Specify <code>true</code> to produce
    one document for each slide.  The default is <code>false</code>.</dd>
    <dt><p>&lt;speaker-notes&gt;</p></dt><dd>Specify <code>true</code> to 
    include speaker notes in the output. The default is <code>false</code>.</dd>
    <dt><p>Sample Options Node:</p></dt>
    <dd>The following is a sample options node which specifies that tidy is
    used to clean the generated html, specifies to use the tidy "clean" 
    option, and specifies to only convert the second slide of the document:
    <pre xml:space="preserve">
&lt;options xmlns="xdmp:powerpoint-convert"
         xmlns:tidy="xdmp:tidy"&gt;
  &lt;tidy&gt;true&lt;/tidy&gt;
  &lt;tidy:clean&gt;yes&lt;/tidy:clean&gt;
  &lt;slideID&gt;2&lt;/slideID&gt;
&lt;/options&gt;
</pre></dd>
    </dl>
    </blockquote>
  </apidoc:param>
    </apidoc:params>
    <apidoc:return>node()*</apidoc:return>
    <apidoc:usage>
  The convert functions return several nodes.  The first node is a manifest
  containing the various parts of the conversion. Typically there will be
  an xml part, a css part, and some image parts.  Each part is returned as
  a separate node in the order shown in the manifest. 
  <p xmlns="http://www.w3.org/1999/xhtml">Therefore, given the following manifest: </p>
  <pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
&lt;parts&gt;
  &lt;part&gt;myFile_ppt.xhtml&lt;/part&gt;
  &lt;part&gt;myFile_ppt_parts/conv.css&lt;/part&gt;
  &lt;part&gt;myFile_ppt_parts/toc.xml&lt;/part&gt;
&lt;/parts&gt;
</pre>
  <p xmlns="http://www.w3.org/1999/xhtml">the first node of the returned query is the manifest, the second is the 
  "myFile_ppt.xhtml" node, the third is the "myFile_ppt_parts/conv.css" node, 
  and the fourth is the myFile_ppt_parts/toc.xml node.</p>
  
</apidoc:usage>
    <apidoc:example><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
let $results := xdmp:powerpoint-convert( 
                         xdmp:document-get("myFile.ppt"),
                         "myFile.ppt" ),
    $manifest := $results[1]
return 
$results[2 to last()]

=&gt; all of the converted nodes
</pre></apidoc:example>
  </apidoc:function></apidoc:module>