Joe,
I am able to run the XQueryXPath samples just fine with the XMLBeans
2.3.0 release.
I have saxon8.jar and saxon8-dom.jar in my classpath. I am using Saxon
8.8.
The jars needed are documented in the XMLBeans FAQ:
http://wiki.apache.org/xmlbeans/XmlBeansFaq#whatJars
- Wing Yew

________________________________

From: Joe White [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 10:35 AM
To: user@xmlbeans.apache.org
Subject: Xpath help



I am using xmlbeans 2.3.0 and I am trying to use xpath to query a
document. I am trying to run the example under
{xbeans_dist}\samples\XQueryXPath. My classpath includes all of the
distributed jars (including xbean_xpath.jar) and saxon8.jar. When trying
to run the xpath from the example which is:  

declare namespace
xq='http://xmlbeans.apache.org/samples/xquery/employees';$this/xq:employ
ees/xq:employee/xq:phone/[EMAIL PROTECTED]'work']

 

Any time I run any xpath I get the exception below. Any help is greatly
appreciated. I've also tried saxon9 with the same result.

 

java.lang.RuntimeException:  Trying XBeans path engine... Trying XQRL...
Trying Saxon... FAILED on declare namespace
xq='http://xmlbeans.apache.org/samples/xquery/employees';$this/xq:employ
ees/xq:employee/xq:phone/[EMAIL PROTECTED]'work']

      at
org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:131)

      at
org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:91)

      at
org.apache.xmlbeans.impl.store.Cursor._selectPath(Cursor.java:902)

      at
org.apache.xmlbeans.impl.store.Cursor.selectPath(Cursor.java:2634)

      at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.j
ava:431)

      at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.j
ava:415)

      at
org.apache.xmlbeans.samples.xquery.SelectPath.updateWorkPhone(SelectPath
.java:75)

      at
org.apache.xmlbeans.samples.xquery.XQueryXPath.executeQueries(XQueryXPat
h.java:84)

      at
org.apache.xmlbeans.samples.xquery.XQueryXPath.main(XQueryXPath.java:54)

Exception in thread "main" java.lang.RuntimeException:  Trying XBeans
path engine... Trying XQRL... Trying Saxon... FAILED on declare
namespace
xq='http://xmlbeans.apache.org/samples/xquery/employees';$this//xq:emplo
yee/xq:name/text()

      at
org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:131)

      at
org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:91)

      at
org.apache.xmlbeans.impl.store.Cursor._selectPath(Cursor.java:902)

      at
org.apache.xmlbeans.impl.store.Cursor._selectPath(Cursor.java:894)

      at
org.apache.xmlbeans.impl.store.Cursor.selectPath(Cursor.java:2616)

      at
org.apache.xmlbeans.samples.xquery.SelectPath.collectNames(SelectPath.ja
va:133)

      at
org.apache.xmlbeans.samples.xquery.XQueryXPath.executeQueries(XQueryXPat
h.java:87)

      at
org.apache.xmlbeans.samples.xquery.XQueryXPath.main(XQueryXPath.java:54)

 

 

Thank you

Joe


Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.
  • Xpath help Joe White
    • RE: Xpath help Wing Yew Poon

Reply via email to