I wrote XSLT to convert Word 2010 XML to DocBook. I think it should be possible to use XSLT (and a zip utility) to create Word files from DocBook.
It might be easier to create a Word file from DocBook than the reverse, actually. A lot of the work I had to do was in wrapping the flat paragraph structure of a Word file in the explicit structure of DocBook XML. Flattening DocBook would be simpler, I imagine. It would be a big project though. The XML structure in a Word file is intricate. Peter On Tue, Apr 5, 2016 at 4:11 PM, Mordechai <[email protected]> wrote: > The only thing I can think about is vba. I have a script that takes a word > document and turns it into an HTML document (converting para styles > mostly), I'm working on doing something similar that will create docbook > tags instead of HTML tags, I imagine in your case you would need something > in reverse. > > > On 05/04/2016 3:55 PM, Fredrik Unger wrote: > > Dear all, > > I have been trying for a while to generate a Word 2010 file from Docbook. > I have a Word Template with styles for the most common things > like Heading 1, Title etc. > > I had some problems with Word 2007 with name changes in styles. > The style Title became Titel in the German version of Word. > > I would like to simply put the content of a Docbook article into > a word document using the external template for style. > Actually > pandoc --from=docbook --to=docx --reference-docx=Template.docx > --output=Article.docx Article.xml > would do but this does not work very well. > > What ways or tools are available ? > Do I have to use other formats as intermediate ? > or is it not possible... > > Basically the article has sections (nested), title, para, imageobjects, > and lists.. tables would be a plus. > Would be ok with a subset but a plus if one can map a tag to a style. > > Any ideas and pointers ? > I have looked at pandoc and python-docx but the solutions become > complex and not very automatic. > There used to be some effort for stylesheets but I guess that would not > work with the predefined styles of the Template ? > > Fredrik Unger > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- To > unsubscribe, e-mail: [email protected] For > additional commands, e-mail: [email protected] >
