Jon,
since you were using xmlbeans 2.1 before, presumably you have
xbean.jar and jsr173_1.0_api.jar in your classpath, together with
xbean_xpath.jar and saxon8.jar; now you need saxon8-dom.jar as well.
If you have all the jars in your classpath and are experiencing 
your problem, then I don't know what else to tell you.
It may be a problem with saxon rather than xmlbeans, but I know
rather little about xpath and saxon and I can't say.
- Wing Yew 

-----Original Message-----
From: Baker, Jon [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 03, 2006 9:44 AM
To: user@xmlbeans.apache.org
Subject: XMLBeans 2.2.0 and SaxonB8.6.1 - selectPath() nol longer
working?

I just upgraded to XmlBeans 2.2.0 from XmlBeans 2.1.0. My code that
used the XmlObject.selectPath(String path) method no longer works. Is
there an additional step I need to take to use selectPath in XmeBeans
2.2.0 with saxonb8.6.1?

In the past I have simply built a jar of XmlBeans classes for our
schema using the scomp utility and then included this in my projects. 

Our schema is quite large so I have not attached it. I will gladly do
so if you are interested.


here is the bit of code that is causing the trouble:
-------------begin code--------------------
String xpath = "./[EMAIL PROTECTED]'" + id + "\']";
XmlObject[] objs =
doc.getOvalDefinitions().getDefinitions().selectPath(xpath);

-------------end code--------------------

Here is error I get:
 

java.lang.RuntimeException: net.sf.saxon.trans.DynamicError: The
context item for axis step descendant::element() is undefined
at
org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectNodes(XBeansXPat
h.java:102)

at
org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectPath(XBeansXPath
.java:108)

at
org.apache.xmlbeans.impl.store.Path$SaxonPathImpl$SaxonPathEngine.next(
Path.java:496)

at org.apache.xmlbeans.impl.store.Cursor._toSelection(Cursor.java:931)

at
org.apache.xmlbeans.impl.store.Cursor._toNextSelection(Cursor.java:920)

at
org.apache.xmlbeans.impl.store.Cursor._hasNextSelection(Cursor.java:912
)

at
org.apache.xmlbeans.impl.store.Cursor.hasNextSelection(Cursor.java:2652
)

at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.
java:433)

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

at
org.mitre.oval.xmlapi.DefinitionApi.updateXml(DefinitionApi.java:565)


Thanks for any help,

Jon

============================================
Jon Baker
INFOSEC Eng/Scientist, Sr.
The MITRE Corporation
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_______________________________________________________________________
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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to