wordpress hit counter
Re: Document generation with XML Data and XPath - Java - Development Tools - OpenXML Developer

Re: Document generation with XML Data and XPath

Development Tools

Discussions about working with Open XML using a wide range of development tools

Document generation with XML Data and XPath

  • rated by 0 users
  • This post has 2 Replies |
  • 2 Followers
  • Hi

    I had the task to create a .docx document based on a template. This template is also a .docx document, and it has repeated regions which should be filled with data from a xml datasource.

    I use Apache Velocity to do this task. Basically, the Velocity tags are normal text paragraphs inside the template file. The template is preprocessed, the result is a real world Velocity Template. This uses XPath and a set of common expressions to iterate over the data, add data to the template and also add images as well.

    It is part of the Mogwai EA Reports tool. It uses Enterprise Architect Models, converts them to XML files, and uses a docx template to create use case specifications or whatever you want. Feel free to visit the project website at http://mogwai.sourceforge.net for more details. Of course, feedback is also very welcome. The sources for the above example are also available for download.

    Regards

    Mirko

     

  • Hi Mirko,
    Impressive!
    I notice that Mogwai has an example use case docx template. I wonder if you might know where I can find templates covering other Enterprise Architect Models, e.g. "Requirements" "Class Model" "Domain Model" "Database" and the like?
    Thanks
    James
  • Very nice tool Mirko. I'm a big fan of Windward Reports for Reporting and Doc Gen design in Office, but my opinion is surely biased considering I work here!

    -Randy

    Randy C
Page 1 of 1 (3 items)