The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

Document Editing on Small Devices - XMerge

Background | Overview | News and Updates | Proposed Future Projects | Plugins | Documentation and Resources | Building XMerge

Project Owner: Svante Schubert
(Please use the provided mailing lists for discussion of the XML based file format and related issues.)


The goals of the Document Editing on Small Devices project is to:

The XMerge SDK provides a Java-based framework for converting documents between different formats using conversion plugins to read and write each format. More about what plugins are available can be found in the plugin section below.

In addition to format conversion, the XMerge SDK provides a framework for merging changes in one document format (usually a simpler or lower quality format) into an original document (typically in a richer format). The benefit of merging  is that richer styles or content in the original document are retained, while the edits made to the simpler format can be applied or merged into the original document.

To meet these goals there are two significant interfaces in XMerge:

All plugins are designed to support the XML file format on one side and the device format on the other, the framework is able to support "chaining" of conversions, also known as an "Any-to-Any" conversion, eg. convert from a Palm document to a PocketPC document through the intermediate XML file format.

News and updates

Proposed future projects


Platform Plug-in Name Description Current Status
The XSLT plug-in, makes use of the Xalan XSLT processor, in order to translate an xml document to and from a specified xml/xhtml format.
Source Available
Plugin for editing StarWriter documents in the AportisDoc format originally developed by Aportis Technology Corporation.  However Aportis as of 31st Dec 2002 were acquired by UltraSoft. There are still many palm applications that use the Aportisdoc format. This plugin supports merging of textual changes. Source Available
Sample implementation for editing StarCalc spreadsheets with MiniCalc on the Palm. This plugin supports merging of textual changes.
Source Available
Pocket Word
Support of editing text documents through PocketWord
Source Available
Pocket Excel
Support for editing spreadsheets in PocketExcel
Source Available
*Follow links for more information and screen-shots.

Documentation and Resources

Documentation for the XMerge SDK
Document Summary Format and Size
XMerge Document Conversion SDK
A developer's guide for the XMerge SDK. Describes how to use the client API, implement plugins, testing and installing plug-ins.
PDF, 180K
XSLT Plugin Implementation
Describes the XSLT converter plugin, how to use it and also how to implement further XSLT plugins.
PDF, 11K
XMerge JavaDocs
Generated from JavaDoc comments in the sources.
ZIP,  364K

Building XMerge

The following document describes the process for building the XMerge project, either standalone or as part of the build environment.


The following tools are necessary in order to build the XMerge project.

Note: Java 1.4 includes the Crimson XML parser and Xalan. If using Java 1.4 the only requirement is Ant.

N.B. Xalan 2.3 splits the XSLT classes between two JAR files. The build environment expects the XSLT classes to be contained in xalan.jar only.

Obtaining the source

The source for XMerge is maintained under CVS control as part of the XML project.  

See the XML Project's Source page for information on obtaining and contributing to source code.

If using CVS, setup your CVS access according to the Source page and checkout the xmerge module.
  % cvs co oo/xml/xmerge

The source can also be downloaded as a ZIP file here.

Building in a Standalone Environment

To build XMerge in a standalone environment, copy all of the jar files mentioned above and the Xalan-J archive into a directory.

You will need to include the Ant binary directory in your PATH.  Ant requires that the JAVA_HOME variable also be set.

Wrapper scripts have been provided to execute the build.   On a UNIX based system use:

    % build_xmerge -jars <jar_location> [-debug | optimize]

and on Windows use :

    C:\XMerge> build_xmerge.bat -jars <jar_location> [-debug | -optimize]

where <jar_location> is the directory containing the required JAR files.

Note: If using Java 1.4 the jar file location can be given as any directory as Java 1.4 includes the XML and XSLT class files.

The scripts also support building a debug version and an optimized version.  Simply specify -debug or -optimize as options.   These options are mutually exclusive.  If both are set, the first one encountered will be used for build purposes.

Building as part of

Setup your build environment as detailed in the build documents.

To build XMerge, you will also need to copy the Ant and Xalan-J Jar files into your solver's bin directory, e.g. ${SOLARVER}/642/{platform}/bin.

Once these files are present simply execute the build:

    % build

The build will execute and JAR files and documentation will be contained in a platform-named directory created in the xmerge directory.

Running the Test Driver command-line utility

Once the sources have been built, you can test the plugins using the test Driver command-line utility. 

To this you will need to know the location of all the JAR files that were built, this will vary depending on the mechanism used to build. You will also need the location of the JAR files that you downloaded as stated in the Requirements section above.

Once you have all of this, you execute the  test Driver as follows:

    % java -cp <jar_location> org.openoffice.xmerge.test.Driver -from <mime-type> -to <mime-type> [-merge <original file>] <file>... 

The from and to mime-types to use will depend on the type of documents being converted. The "-merge" option is only usable when converting from the device format to the document.

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.