Word to MediaWiki conversion with XSLT

I've tried two Word to MediaWiki converters: the set of macros described in the Word2MediaWikiPlus extension and the OpenOffice converter. The OpenOffice converter does not work too well (for example, if you have a paragraph style with COURIER font, it's not transformed into MediaWiki code markup) and I needed some extensions that would be hard to cram into Word macros used by Word2MediaWikiPlus, so I decided to implement the converter as an XSLT translator (usable in Word 2003/2007) that should be easy(er) to modify for someone fluent in XSLT. You can find the current (pre-alpha) sources on SourceForge and download the alpha release. If I'm missing a functionality you desperately need, let me know.

2 comments:

Anonymous said...

Thanks for posting this! I have Word 2003, but there were a couple of problems with your instructions: (1) You did not say that the executable was a macro (it took me a second to figure that out); (2) you said to place the files inside the office template's folder but I got an error message because of that (even with Word security at its lowest) -- I had to put the files in my Word startup folder instead...maybe the Word templates folder would have worked too (probably); (3) the killer was that when I finally got this all to run, it stopped dead b/c per the error message I did not have the "xmlsavedata" method, which is only available with Office Professional (I have Office Standard for 2003). Macros in general do work on my machine...stumped, giving up.

Ivan Pepelnjak said...

#1 - Fair. Will change the instructions

#2 - No idea. I have a common template folder for all Office applications and I have put the .dot document and all XSL documents in that folder.

#3 - OUCH :(( This is what Microsoft is saying: "Note: In all Office 2003 Editions, Word 2003 documents can be saved in a native XML file format which can be manipulated and searched using any program that can process industry standard XML. With Office Professional Edition 2003, companies can also use customised XML formats - or schemas - to enable easier and more advanced information creation, capture, exchange and reuse."

It looks like Save-as-XML with XSL transformation doesn't work in Standard edition. I have a workaround (save-as-XML, open with MSXML, do transformation with MSXML), but it's awkward and I have no testbed (all I ever use is Office Professional). If you're willing to do the tests for me, please send me a note.

Post a Comment