The difference between your input (test.docx) and output (test-out.docx) is in the namespace prefix used in the itemProps.xml file.
The input uses ds as the namespace prefix; the output uses ns1.
The Content Control Toolkit's PkgLoader.cs class has a hardcoded dependency on the ds prefix.
docx4j should probably output the same prefix to avoid problems like this; i've just committed a patch which does so.
btw, you know about my Word Add-In, for doing much the same thing as the content control toolkit, but also supporting repeats & conditionals? See the new URL
http://www.opendope.org/implementations.htmlc.hoeflake wrote:When in docx, getting the CustomXmlDataStoragePart with the databinding ID (.toLowerCase()) of the control results in null.
You mean "When in docx4j", I guess. And something like:
- Code: Select all
CustomXmlDataStoragePart part = wmlPkg.getCustomXmlDataStorageParts().get(storeItemId.toLowerCase());
returns null? It shouldn't. You are passing "{e844e250-db0a-431a-bb67-3517237d1b4c}"?
I just tested, so if you continue to have probs; you'll need to post your source code pls.
By the way, your test.docx contains 2 Custom XML parts, both with the same itemID, which is bad. I've just made a commit which will check for this during the load process, and warn you.
hth .. Jason