Package org.docx4j.model.datastorage
Class OpenDoPEHandler
java.lang.Object
org.docx4j.model.datastorage.OpenDoPEHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringlongstatic booleanlong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProvide a way to for user to fetch the starting bookmark ID number for use in the next stage (ie Binding Traverse).protected static Set<ContentAccessor>getParts(WordprocessingMLPackage srcPackage) protected static StringgetRepeatXpathBase(String xpath) Massage the xpath into an expected format, by dropping any trailing '/' or [1]static SdtPrPreprocess content controls which have tag "od:condition|od:repeat|od:component".
-
Field Details
-
ENABLE_XPATH_CACHE
public static boolean ENABLE_XPATH_CACHE -
BINDING_ROLE_XPATH
- See Also:
-
BINDING_ROLE_CONDITIONAL
- See Also:
-
BINDING_RESULT_CONDITION_FALSE
- See Also:
-
BINDING_ROLE_REPEAT
- See Also:
-
BINDING_RESULT_RPTD_ZERO
- See Also:
-
BINDING_RESULT_RPTD_ZERO_W15
- See Also:
-
BINDING_RESULT_RPTD
- See Also:
-
BINDING_ROLE_RPT_POS_CON
- See Also:
-
BINDING_ROLE_NARRATIVE
- See Also:
-
BINDING_ROLE_COMPONENT
- See Also:
-
BINDING_ROLE_COMPONENT_BEFORE
- See Also:
-
BINDING_ROLE_COMPONENT_AFTER
- See Also:
-
BINDING_ROLE_COMPONENT_CONTEXT
- See Also:
-
BINDING_ROLE_FINISHER
- See Also:
-
BINDING_CONTENTTYPE
- See Also:
-
BINDING_HANDLER
- See Also:
-
BINDING_PROGID
- See Also:
-
cloneTime
public long cloneTime -
fixBTime
public long fixBTime
-
-
Constructor Details
-
OpenDoPEHandler
- Throws:
Docx4JException
-
-
Method Details
-
getDomToXPathMap
-
getNextBookmarkId
Provide a way to for user to fetch the starting bookmark ID number for use in the next stage (ie Binding Traverse). If it isn't fetched/set, the value will have to be recalculated (less efficient).- Since:
- 3.2.1
-
preprocess
Preprocess content controls which have tag "od:condition|od:repeat|od:component". It is "preprocess" in the sense that it is "pre" opening in Word The algorithm is as follows: Inject components first. Look at each top level SDT (ShallowTraversor). If it does not have a real data binding, it might have a bindingrole tag we need to process (processBindingRoleIfAny). Conditionals are easy. processRepeat method: - clones the sdt n times - invokes DeepTraversor which changes xpath binding on descendant sdts (both sdts with real bindings and sdts with bindingrole tags). It is not the job of DeepTraversor to expand out any other repeats it might encounter, or to resolve conditionals. Those things are done by ShallowTraversor, to which control returns, as it continues its traverse. The implementation of 13 Sept 2010 replaced the previous XPath based implementation, which did not support nested repeats. I've chosen to build this around TraversalUtil, instead of using XSLT, and this seems to have worked out nicely. The implementation of 10 October 2010 replaced the v1 conventions implementation with a v2 implementation. The main method in this class can convert v1 documents to v2. The v2 implementation is not yet complete. All v1 features are implemented, but not the new v2 stuff (eg complex conditions).- Parameters:
documentPart-- Throws:
ExceptionDocx4JException
-
getParts
-
getRepeatXpathBase
Massage the xpath into an expected format, by dropping any trailing '/' or [1]- Parameters:
xpath-- Returns:
-
getSdtPr
-