Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

XML Filter Tools

It's the purpose of these tools to load XML-based filter components and to execute them stand-alone. The basic concept of XML-based filter components are described in the OOo Guide to XML Filters.

Note: There have been some questions on what you can actually do with xfilter. If a filter was written according to the XML-based filter concept, then it can be used with the tool. Unfortunately, OpenOffice.org currently does not include any such filters. The reason is that the concept is fairly new, and most filters (including the MS filters) have been developed before that. StarOffice 6.0, which is based on OpenOffice.org but includes (among others; see FAQ) some additional filters has three new filters that can be used with the xfilter tool.

Use

  1. You need:
    • an installed OOo
    • xfilter binaries for that build
    • the regcomp binary from the ODK
  2. Copy the files for your platform into the OOo program directory
  3. Call the starter script with parameters for the component name and input file. The starter script will register the libraries and then call the actual xfilter program.

Example:

Implementation Detail

The program consists of a starter application, which initializes the UNO runtime and the UCB to provide for UNO component instantiation and input/output functionality, respectively. Then, the starter program instantiates the filter component (as given on the command line), and imitates the use of the component through the XImporter and XFilter interfaces.

Limitations in the emulation of the OOo filter invocation are:

In order to generate output on the console, the com.sun.comp.Writer.XMLImporter component, which is usually instantiated by the filter component, needs to be replaced by a dummy implementation that simply outputs the XML data to the standard console output. This dummy implementation is given in the xfilter DLL/lib (xfiltermi.dll/libxfilter??.so).

StarOffice Filter components, on which the xfilter tool has been tested:

Source code

The source code for this probably isn't very interesting, but you can obtain it from the xml/filtertools directory in the CVS archive. You can also browse it online.

Binaries

Binaries for a few platforms can be downloaded here:


Please direct comments and suggestions to the xml-dev mailing list (archive) or to dvo.

Apache Software Foundation

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

Apache, OpenOffice, OpenOffice.org 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.