Hi All, I using xmlbeans 2.4.0 with saxon 9.0 to do XPATH query like:
XmlObject[] elementAr = vpioDocument.getVpio().getPromotion().getBaseLayout().selectPath(PromoDocumentRepository.VP_NAMESPACE + "$this/vp:page/vp:blo...@id='" + blockId + "']/vp:regionBlock[not(@regionId) or @regionId = '" + regionId + "']"); Unfortunatly i got a NullPointerExceptino in Saxon and so far haven't found why on the web (If you have a clue go for it :-)) So to workaround the bug I checked to upgrade to 2.5.0 but the doc says: file:///C:/java/xmlbeans-2.5.0/docs/guide/conSelectingXMLwithXQueryPathXPath.html that it used an older version SaxonB 8.6.1. Can I use the latest Saxon 9.2 directly ? Thanks for your answers! David P.S.: Here is the exception I got with xmlBeans and saxon 9: java.lang.NullPointerException at net.sf.saxon.dom.NodeWrapper$ChildEnumeration.skipFollowingTextNodes(NodeWrapper.java:1088) at net.sf.saxon.dom.NodeWrapper$ChildEnumeration.next(NodeWrapper.java:1114) at net.sf.saxon.om.Navigator$AxisFilter.next(Navigator.java:882) at net.sf.saxon.expr.FilterIterator.getNextMatchingItem(FilterIterator.java:61) at net.sf.saxon.expr.FilterIterator.next(FilterIterator.java:44) at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:54) at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:51) at net.sf.saxon.value.SequenceExtent.<init>(SequenceExtent.java:98) at net.sf.saxon.sort.DocumentOrderIterator.<init>(DocumentOrderIterator.java:30) at net.sf.saxon.sort.DocumentSorter.iterate(DocumentSorter.java:84) at net.sf.saxon.sxpath.XPathExpression.evaluate(XPathExpression.java:97) at org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectNodes(XBeansXPath.java:119) at org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectPath(XBeansXPath.java:148) at org.apache.xmlbeans.impl.store.Path$DelegatePathImpl$DelegatePathEngine.next(Path.java:541) 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:464) at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:446) at com.qwi.coficio.vp.repository.PageRepositoryImpl.getRegionBlocksForRegion(PageRepositoryImpl.java:153) SaxonB 8.6.1 versions of the saxon8.jar and saxon8-dom.jar