if my custom xml part has 10 entries and the document only is bound to 7 of them, is there a "standard" way in docx4j to get that list of 7? I'm creating a simple system to let users download a blank document that has a custom xml part already added. They can then use the authoring tool to drag and drop the variables into the document. I need to decided if the custom XML part is created with all the available variables and the user can use what they wish, of if I need to ask the user as part of the document creation which variables they plan on using in the document.
Asked
Active
Viewed 159 times
0
-
I don't quite understand why you need this? You could do it (1) as part of simple system adding your custom xml part, (2) the authoring tool could be extended to include it, or (3) you could analyse the authored document. For (3), see https://github.com/plutext/docx4j/blob/master/src/samples/docx4j/org/docx4j/samples/ContentControlsInfoStructure.java – JasonPlutext May 13 '15 at 21:25
-
the idea is the user downloads an empty docx with a custom part that has all available variables...ie; a template. The user can then pick and chose which "variables" to use as they craft the template. The values of the variables are just the variable name wrapped in "{{" and "}}" so the template is readable, but generic. Later when we actually do a merge of customer data, I don't want to show input fields for variables that weren't used in the template. Make sense? I'll give your link a read...thanks again – Jason May 14 '15 at 02:56