Page 1 of 1

Docx4j capabilities

PostPosted: Tue Aug 11, 2015 7:46 pm
by Gang Plebanii
I want to use docx4j in my project, but I can't find some options which I need.
1. Exists in docx4j "if" which can be put in docx and condition will be checking with java variables e.g.
put table to docx
put something else

2. Can I, instead of String, replace ${variable} (in docx) with List<String>?


Re: Docx4j capabilities

PostPosted: Wed Aug 12, 2015 11:30 am
by jason
You can achieve both these things using OpenDoPE content control data binding.

Your #1 "if" is what we call a conditional content control. The XPath expression evaluates to true or false, and only if true, the content it surrounds is retained.

Your #2 is a repeat content control. Whatever the content control surrounds is repeated. This would often be a table row, but it can be anything the content control can validly contain. Repeats can be nested.

Re: Docx4j capabilities

PostPosted: Wed Aug 12, 2015 8:15 pm
by Gang Plebanii
Where I can get some examples of using that?
I don't mean this on github, becouse I don't see anything interesting there.

Re: Docx4j capabilities

PostPosted: Thu Aug 13, 2015 12:13 pm
by jason