docx4j icon indicating copy to clipboard operation
docx4j copied to clipboard

Create Javadoc for VariablePrepare.prepare(WordprocessingMLPackage)

Open eum2o opened this issue 4 years ago • 1 comments

Please document what exactly org.docx4j.model.datastorage.migration.VariablePrepare.prepare(WordprocessingMLPackage) is doing in the Javadoc of this method.

The example main method in the same class states that

// Before .. note attributes w:rsidRDefault="00D15781" w:rsidR="00D15781"

but text like this should be available in the Javadoc of the #prepare method. Further details would be helpful. In particular I'd like to know why the implementation removes the content controls of the given WML package (filterSettings.setRemoveContentControls(true);).

eum2o avatar May 11 '20 13:05 eum2o

Regarding your specific question, VariablePrepare uses an XSLT org/docx4j/openpackaging/packages/filter.xslt which has capabilities which go beyond what is required to join up runs for variable processing. When you join up runs, you'll typically want FLAG_REMOVE_PROOF_ERRORS but normally it wouldn't be necessary to remove content controls ( though conceivably you could have a run level content control inside your "variable").

plutext avatar May 14 '20 00:05 plutext