Package org.docx4j.samples
Class ContentControlBindingExtensions
java.lang.Object
org.docx4j.samples.ContentControlBindingExtensions
This sample demonstrates populating content controls
from a custom xml part (based on the xpaths given
in the content controls), via FLAG_BIND_BIND_XML
Word does this itself automatically, for if there is
a w:databinding element in the sdtPr.
However, out of the box, Word doesn't allow for
repeating things (table rows, paragraphs etc), nor
conditional inclusion/exclusion.
The OpenDoPE conventions support that; and this sample
demonstrates docx4j's implementation of that.
In practice you'll want the XML part to be injected at runtime.
For that, use FLAG_NONE, or include FLAG_BIND_INSERT_XML.
See description of flags below.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic jakarta.xml.bind.JAXBContext(package private) static String -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
context
public static jakarta.xml.bind.JAXBContext context -
filepathprefix
-
-
Constructor Details
-
ContentControlBindingExtensions
public ContentControlBindingExtensions()
-
-
Method Details
-
main
- Throws:
Exception
-