I have a requirement where the rows in an OpenTope template needs to have different shades alternatively. Basically I will be binding the xml data elements to the Docx template created by OpenTope, where the table rows needs to appear in alternating colors. The solution I thought was to create a base template with a table which has two rows, each with a different shade. I would then wrap these two rows in a single od:repeat. For coloring rows alternatively, I would add a od:condition in each row, which makes that particular row appear in the document only if it meets the condition based on the element being iterated (for example, the position of the element or an Xpath expression evaluating the index).
The problem I am facing now is that there is no way to add an od:repeat surrounding two rows in a table with OpenTope. I think this is the default behaviour of the plugin. Can somebody suggest some alternatives for achieving the above requirement? Manipulating the XML content of the docx with JAXB would be an option , but we prefer to take it as the last option as we need the OpenTope template to be dynamic.
Any help or suggestion is highly appreciated!
Thanks and Regards,