Page 1 of 1

How to find orphan conditions and xpaths

PostPosted: Tue Nov 08, 2016 11:01 pm
by klausT
Hi Jason,

Our DocX template has grown over the last couple of years with several changes in the XML structure etc.

I wonder what is the recommended way to identify orphan objects like conditions or xpaths.
Is there any build-in functionality in OpenDope or Word that can be used?

Thanks,
Klaus

Re: How to find orphan conditions and xpaths

PostPosted: Wed Nov 09, 2016 7:26 am
by jason
Hi Klaus

It would be quite straightforward to write something to detect and optionally prune orphans, but nothing in docx4j to do this at present.

kind regards .. Jason

Re: How to find orphan conditions and xpaths

PostPosted: Wed Nov 16, 2016 3:56 am
by klausT
Thanks Jason!

After some scripting and xslt we were able to reduce the conditions and xpathIDs by 50%.