Package org.docx4j.model.datastorage
Class XsltFinisher
java.lang.Object
org.docx4j.model.datastorage.XsltFinisher
As an optional step after binding, apply user-defined XSLT to transform
this content control.
A template is attached to a content control (a repeat/condition/or normal bind),
using tag od:call=XYZ where XYZ is the template to call.
For example, by placing this on a repeat, a table row could be coloured red if
its contents met some condition.
- Author:
- jharrop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(JaxbXmlPart part, Map<String, Xpaths.Xpath> xpathsMap, String filename, Map<String, Map<String, Object>> finisherParams) finisherParams is a map of parameter values you can pass in, which named templates can be sensitive to (eg to set a color).static Objectstatic StringgetTemplateName(String tag) static StringgetXPathValue(Map<String, String> pathMap, WordprocessingMLPackage pkg, Map<String, CustomXmlPart> customXmlDataStorageParts, String storeItemId, String xpath, String prefixMappings) static StringgetXPathValue(Map<String, String> pathMap, WordprocessingMLPackage pkg, Map<String, CustomXmlPart> customXmlDataStorageParts, org.w3c.dom.traversal.NodeIterator sdtPrNodeIt) static voidsetXsltProvider(XsltProvider xsltProvider)
-
Constructor Details
-
XsltFinisher
-
-
Method Details
-
setXsltProvider
-
apply
public void apply(JaxbXmlPart part, Map<String, Xpaths.Xpath> xpathsMap, String filename, Map<String, throws Docx4JExceptionMap<String, Object>> finisherParams) finisherParams is a map of parameter values you can pass in, which named templates can be sensitive to (eg to set a color).- Parameters:
part-xpathsMap-finisherParams-- Throws:
Docx4JException
-
getTemplateName
-
getXPathValue
public static String getXPathValue(Map<String, String> pathMap, WordprocessingMLPackage pkg, Map<String, CustomXmlPart> customXmlDataStorageParts, org.w3c.dom.traversal.NodeIterator sdtPrNodeIt) -
getXPathValue
-
getParam
-