I'm starting a new POI-based maven project. 

I'm converting XML into DOCX and I'm using XMLBeans to navigate my incoming XML.

Everything is working great but...

Now I want to use some XPath and XQuery with my XmlCursor and I'm unable to 
work out the right Maven dependency incantations in order to get a working 
system.

I'm using the following dependencies:

    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi</artifactId>
      <version>3.17</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
      <version>3.17</version>
    </dependency>
   <dependency>
      <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>3.0.0</version>
   </dependency>
   <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>9.8.0-12</version>
        </dependency>

I'm pretty sure I need the separate xmlbeans-xpath library but the only thing I 
can find in the Maven repo is 2.6.0 which dates from 2012 and if I include that 
dependency the fetch fails because it can't find the ancient Saxon library it's 
expecting.

If I run my code:

cursor.selectPath("*:cols/*:col");

With the above dependencies then I get this failure, not surprisingly:

java.lang.RuntimeException:  Trying XBeans path engine... Trying XQRL... Trying 
XDK... Trying delegated path engine... FAILED on *:cols/*:col

So my question is:

With POI 3.0.0 and using Maven, what do I need to do to get XPath/XQuery 
support working?

Perhaps a better question might be: what would be involved in binding XmlBeans 
to Saxon 9.8.*? If it's not too much work that's probably something I can do 
and contribute back to the project. It would be nice, for example, to be able 
to use XPath/XQuery 3 in this context.

Thanks,

Eliot
--
Eliot Kimber
http://contrext.com
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to