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]

