Page 1 of 1

What are the xpath functions supported by Docx4j

PostPosted: Thu Jun 23, 2016 9:18 pm
by shlgw1
I would like to test out the condition binding in docx4j

I found that some xpath function works but some does not, for example contains works but matches does not work:

/path/teststring contains abc

xpath="contains(/path/teststring,"abc")" returns true

xpath="string(/path/teststring)="abc"" does not return true

xpath="matches(/path/teststring,"abc")" fails

Please advise what is the best way to compare xpath value with string.

Re: What are the xpath functions supported by Docx4j

PostPosted: Fri Jun 24, 2016 4:15 pm
by jason
You can use functions supported by the underlying javax.xml.xpath.XPath implementation, namely org.apache.xpath.jaxp.XPathImpl

Which means 1.0 functions.