XHTMLtoRTF is an XSLT 2.0 stylesheet for transforming XHTML into RTF.
While I was job hunting I found that all of the job websites accepted different file formats when it came to uploading your CV. Most accepted .doc and RTF, whilst only some accepted my preferred format of XHTML. I have to confess that I did maintain parallel versions for a while; but got bored with that very quickly. So, I "grasped the nettle" and wrote an XSLT stylesheet to transform my master source XHTML file into RTF.
I thought that this is the sort of thing which might be useful to others so I've release it under the GNU GPL (version 3).
All you need is your source (valid) XHTML file and an XSLT 2.0 processor. I use Saxon which is a Java XSLT processor. In which case you can get it to work by issuing a command like:
java -jar path/to/saxon9.jar
-xsl:path/to/XHTMLtoRTF.xsl -s:path/to/source.xhtml > path/to/result.rtf
Now that probably won't give you exactly what you want in terms of an output RTF document, the reason being that it gives me what I want! So you will need to customise the stylesheet a bit. Don't worry this is actually reasonably straight forward — read on!
Because this software is released under the GNU GPL (version 3) you can customise it!
In order to customise the stylesheet you need to know a little XSLT and a little bit of RTF.
Good luck and happy hacking!