I've got an XML file that contains mostly textual information (list of questions in Moodle XML format). I'd like to convert it to a document that can be opened by MS Word, but I'd like to maintain context (using paragraph styles) so I can convert it back to Moodle XML. Here's what I tried so far:
I made a prototype with RTF with XSLT, but the RTF styling and Unicode support is complex.
I've seen a way to use
<p class="myCustomStyle">with HTML documents which can be opened in Word. But HTML style sheets and mapping them to Word styles seems limited. I need styles that are "based on" (inherit from) other styles and it's not clear how this works using HTML classes and CSS.
I've looked at OpenXML with Office. The
<w:blah>tags are pretty easy to use, but I don't like the whole ZIP archive solution. This means styles go in one XML file, content in another, etc. I'm guessing I'll need another step beyond XSLT (some kind of script to do multiple transforms). I'm trying to keep it simple:
Is there a way to make a single XML-like (not RTF) file that imports styled paragraphs into Word?