Yes, you can use XSLT to transform from any of those XML formats to OOXML. XSLT is ideal for XML to XML transformations.
That said, each of the input XML formats you mention are fairly complex, and OOXML is immensely complex. Also, DOCX is actually an assembly of many components, including a document.xml
file in OOXML, packaged via Open Packaging Conventions.
To get started, I recommend that you target creation of a simple document that you first make manually in MS Word. Rename the file from a .docx
extension to a .zip
extension, and unzip the components and recover the word/document.xml
file. Make a simple XSLT program to output the OOXML literally as it appears in the original word/document.xml
file. Then, slowly add in some customizations. When you are finished, reinsert the generated word/document.xml
file into the unzipped assembly, rezip, renaming the extension to .docx
and you'll have directly converted XML to DOCX as requested.
For further details, see Using XSLT and Open XML to Create a Word 2007 Document.