Page 1 of 1

Problems evaluating xpath

PostPosted: Wed Jun 04, 2014 3:13 am
by erwangouyette
Hello,

I'm posting because when I use "Add Condition", with the OpenDoPE Add-In in order to wrap a binded value to the XML, I've got a dox4JException saying that it can't evaluate the xpath. Even if it's the default xpath appearing when clicking on "Add Condition".

For example:
Code: Select all
count(/ns0:report[1]/ns0:header[1]/ns0:scanDate[1]/@dateAsL10nString)>0

generates an error with the log message:
Code: Select all
org.docx4j.openpackaging.exceptions.Docx4JException: Problems evaluating xpath 'count(/ns0:report[1]/ns0:header[1]/ns0:scanDate[1]/@dateAsL10nString)>0'


Any help would be appreciated. thank you,

Erwan

PS: I'm currently working with Microsoft Office Word 2010 Professional Plus (32 bits) and OpenDoPE authoring Word Add-In, version 1.1, March 2013.

Re: Problems evaluating xpath

PostPosted: Wed Jun 04, 2014 6:38 pm
by erwangouyette
So the problem persists but I founf a strange behaviour from Docx4j.

When I start my application and use the temlpate as indicated above, it fails with the log message "Problems evaluating xpath".

But when I start my application and use an old template (which I know is working) it works. Then, without stopping the application, I replace the template with the new one, and it works perfectly fine.

The I stop the application and relaunch it, using the new template, and it fails with the same log message "Problems evaluating xpath".

PS: I re-installed OpenDoPE Authoring Add-In from installer found at " http://www.opendope.org/downloads/authoring-friendly/setup.exe ".

Re: Problems evaluating xpath

PostPosted: Wed Jun 04, 2014 7:38 pm
by erwangouyette
Okay, I tried to build a new template on another computer, and I find the same problem.

Re: Problems evaluating xpath

PostPosted: Wed Jun 04, 2014 9:10 pm
by erwangouyette
Just to test, I tried with an old version of my application.
The result is the same.

Is there any incompatibility with a Microsoft Office update ?...

Re: Problems evaluating xpath

PostPosted: Wed Jun 04, 2014 11:45 pm
by jason
Strange. Could you please attach (or email me) a simple docx with which I can replicate the issue?