I am getting started with docx4j, and I'd like to know what would be the best way to create templates...
I have tried playing with it. I managed creating a template using both the "old" add-in and the "Author" Word Add-In. While they work for most of the basic cases, I found that I had to manually edit the word xml to get the following cases working:
- Repeating items so they show up as a nested list (inside another list)
- Using an od:component tag when using the "Author" add-in
Now, I might missing the point here, and that is why I ask that you tell me how you guys do it. I will be evolving in an environment where non-technical users (that is people having close to no knowledge of the OOXML/OpenDoPE specs) will have to modify templates.
Ideally, what I'd like to do is this:
- Define a fixed data model (Javabeans in my case)
- Generate an xml detailing data model format (XML representation of my beans, for example using XStream, or JAXB)
- Have a user import said XML model into the OpenDoPE Add-In in Word
- Have same user build the template by binding against imported XML model
- At generation time, use the built template to generate the document by rebinding content controls against the computed datamodel (that will be same format as the original one
As fas as I can see, I can easily do all of these already. My only issue is the fact that the Add-In features do not allow enough flexibility to my taste.
Is there another tool I haven't found? How do you guys do it? Any of you working in a similar environment (where non-tech personnel has to design templates)?