Class FromVariableReplacement
java.lang.Object
org.docx4j.model.datastorage.migration.AbstractMigrator
org.docx4j.model.datastorage.migration.AbstractMigratorUsingAnswersFormat
org.docx4j.model.datastorage.migration.FromVariableReplacement
This class will help you to migrate
from a string replacement approach,
to use of content control data bindings.
After migrating, you'll be able to
use the OpenDoPE authoring tool to
add repeats, conditionals, and other
OpenDoPE features, if you need them.
It assumes your magic strings take the
form ${--}. If they don't, you'll
need to modify this class, or use Word
to search/replace to change them so they
take that form.
We'd be happy to accept a patch which
specifies a regex the magic string
must match.
Limitations: this first version
operates only on the main document part
(ie it won't process variables in
headers/footers, footnotes/endnotes,
or comments)
- Since:
- 3.0.0
- Author:
- jharrop
-
Field Summary
Fields inherited from class org.docx4j.model.datastorage.migration.AbstractMigratorUsingAnswersFormat
keys, questionsPart, standardisedAnswersPartFields inherited from class org.docx4j.model.datastorage.migration.AbstractMigrator
conditionsPart, storeItemID, xPathsPart -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.docx4j.model.datastorage.migration.AbstractMigratorUsingAnswersFormat
createContentControl, createPartsMethods inherited from class org.docx4j.model.datastorage.migration.AbstractMigrator
addPropertiesPart, createConditionsPart, createContentControl, createSdtPr, createSdtRun, createXPathsPart