docx4j (from 2.5.0) contains a mechanism for processing conditional content controls and repeats. See http://dev.plutext.org/svn/docx4j/trunk/docx4j/sample-docs/databinding/conventions.docx for an explanation.
The correct link is now http://dev.plutext.org/svn/docx4j/trunk/docx4j/sample-docs/word/databinding/conventions.docx.