This page was generated
July 7, 2010
4:04 PM
XQuery Built-In and Modules Function Reference

Module: WordProcessingML

The WordProcessingML function module is installed as the following file:

  • install_dir/Modules/MarkLogic/openxml/word-processing-ml.xqy

where install_dir is the directory in which MarkLogic Server is installed.

To use the word-processing-ml.xqy module in your own XQuery modules, include the following line in your XQuery prolog:

import module namespace ooxml="http://marklogic.com/openxml" 
	    at "/MarkLogic/openxml/word-processing-ml.xqy";

The WordProcessingML functions are used with the Word 2007 documents.

Function Summary
ooxml:runs-merge This function updates document or paragraph node(s) (from a Word 2007 document) so that all similar runs are merged, retaining formatting, and removing text split across elements.
Function Detail
ooxml:runs-merge(
$nodes as node()*
)  as  node()*
Summary:

This function updates document or paragraph node(s) (from a Word 2007 document) so that all similar runs are merged, retaining formatting, and removing text split across elements.

Parameters:
$nodes : The nodes to merge.

Example:
xquery version "1.0-ml";
import module namespace ooxml= "http://marklogic.com/openxml" 
          at "/MarkLogic/openxml/word-processing-ml.xqy";
declare namespace w=
	  "http://schemas.openxmlformats.org/wordprocessingml/2006/main";

let $runs := <w:p w:rsidR="00D203FD" w:rsidRDefault="00423AEC">
           <w:r><w:t>This is a de</w:t></w:r>
           <w:r><w:t xml:space="preserve">monstration </w:t></w:r>
            <w:r><w:t>of merging runs</w:t></w:r>
        </w:p>
return	  
ooxml:runs-merge($runs)
=>
<w:p w:rsidR="00D203FD" w:rsidRDefault="00423AEC" 
 xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
 <w:r>
	 <w:t xml:space="preserve">This is a demonstration of merging runs</w:t>
  </w:r>
</w:p>