Saturday, March 15, 2008

JspWiki export from OpenOffice 2.3

If you have Open Office 2.3, you probably noticed that you can export your document to Media Wiki format (with File->Export). I needed JspWiki format, and it turned out, they are fairly similar, so I changed corresponding XSLT file, and present you here way to add JspWiki export. It will work on both Linux and Windows, and it will only work on Open Office version >= 2.3.

First download this zip. This is zip file that should be extracted to your $INSTALL_DIR/share directory, so it should end up probably in:
C:\Program Files\Open Office\share\

if you are using Windows, or, if you are using Linux, it should be:
/usr/lib/openoffice/share


Of course, if this directory doesn't exist on your system, find out where Open Office 2.3 is installed. This will add XSLT files, so Open Office knows how to export to JspWiki, and it will overwrite two files, so this export can be registered in Open Office (so that you will be able to go to File->Export and select JspWiki export from drop down list).

Advanced


How this works? Media Wiki and JspWiki seems to be very different, but they are pretty much the same, except for different markup characters. If you diff against jspwiki/odt2jspwiki.xsl and wiki/odt2jspwiki.xsl, you will find that they differ by only few lines that needs to be modified in order to have JspWiki export that does as much as Media Wiki export. I started by basically copying Media Wiki .xslt and modifying it. This is also the way you should start if you want to add support to Open Office so it can export to wiki format you need. Have fun!

1 comment:

gadgetgeek said...

The jspwiki.zip file is missing. Can you please post it again?