ODF-XSLT Document Generator

Welcome to the ODF-XSLT project. The ODF-XSLT Document Generator is a library written in PHP 5 that brings the full power of XSLT to your OpenDocument files. It enables you to use ODF files as if they were plain XSLT templates. It also includes a few extra parsing options that allow you to edit the XSLT parts of these ODF from within your favourite office suite. ODF-XSLT is developed by Tribal Internet Marketing and is released as Free Software under the GNU General Public License, version 3.


  • 2012-08-31: Relicensed under the LGPL.
  • 2008-01-08: Project announcement and first release of odf-xslt.


  • Based on the industry standard (ISO/IEC 26300) OpenDocument format.
  • Multiple document types supported (text, spreadsheet, etcetera).
  • Full XSLT support. Since XSLT is Turing-complete, anything is possible (in theory).
  • Templates can be edited from within your office suite, such as OpenOffice.org or KOffice 2.
  • Easily extensible by hooking in pre- and postprocessors.


  • PHP 5.2 or later
  • PHP CLI for the commandline utility
  • libxslt and the PHP XSL extension
  • zlib and the PHP Zip extension


The latest releases for ODF-XSLT can be found in the download section, or you can grab the most current revision from our Subversion repository. The latest nightly snapshot from the repository is always odf-xslt.snapshot.tar.gz. Note that you need GNU make to build the latest subversion tarball. See the Manual for more information.

Known bugs and missing features

  • Indexes and Table of Contents are not automatically updated.
  • Not all ODF documents supported with all office suits
  • Output is not validated against the OpenDocument Format specifications.
  • No shortcuts for common XSLT stanzas means it's harder to use than it has to be at the moment.


  • The Manual describes the command-line parsing utility and the ODF-XSLT templating options that allow you to edit ODF-XSLT templates in your office suite. Read this if you want to create ODF-XSLT templates for your documents.
  • PHP developers who want to use or extend the ODF-XSLT library will want to read the API Reference.
  • You can browse our Subversion repository for the latest code.
  • Feel free to ask questions on the Mailing lists.
  • Bug reports should go in Bugzilla.

Comparison to similar software

There are only a few other Free/Open-Source Software projects that have a similar goal as ODF-XSLT. One of the most widespread is Mirko Nasato's JODReports, formerly JOOReports. JODReports is a report generator written in Java that supports the Freemarker templating language. It is very similar to ODF-XSLT in concept, mainly because my inspiration for ODF-XSLT came from the shortcomings of JODReports. The main benefit of ODF-XSLT over JODReports is the power of XSLT and XPath. Being able to inject XSLT anywhere in your ODF document using XPath means that things that are hard or impossible to do in JODReports — column repeating for example — are perfectly doable with ODF-XSLT. Truth be told, Freemarker syntax is a lot easier to understand than XSLT and XPath. Another benefit of ODF-XSLT is it's ability to handle multiple ODF document types. JODReports only supports OpenDocument Text.

Then there is also Sun's Report Builder extension for OpenOffice.org. It has two downsides over ODF-XSLT; First, it only works with OpenOffice.org. That means it is unavailable to users of other office suits, and that it's hard to use in a fully automated enviroment. Think of a fully automated report generation system. Create a template once and generate reports forever with a cron job. No human intervention required. That is one of the reasons I created ODF-XSLT. Second, Report Builder's focus is squarely on database reports. ODF-XSLT (and JODReports) allow for pretty much any kind of document. But as with JODReports, Sun's Report Builder is easier to understand than ODF-XSLT.