RE: Saxon integration 2.4.0 uses saxon 9 and 2.5.0 uses SaxonB 8.6.1 .. what about the latest version of saxon 9.2 Help me sorting that out

Wing Yew Poon <[email protected]>
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <b4a5259c-fbd7-4c0e-b8f2-d6d901db46c2@default>
David,
XMLBeans 2.5.0 supports the same version of Saxon as XMLBeans 2.4.0 does. If you read otherwise, that is a mistake.
I expect that the behavior you are seeing will be the same if you use XMLBeans 2.5.0 instead of 2.4.0, with Saxon being constant. It could be a bug in Saxon, given that the NPE occurs in the Saxon code. You could try a newer version of Saxon. As long as Saxon hasn't changed its API (which has been known to happen between dot releases), XMLBeans will still work with it.
- Wing Yew

  _____  

From: [email protected] [mailto:[email protected]] 
Sent: Wednesday, March 17, 2010 10:16 AM
To: [email protected]
Subject: Saxon integration 2.4.0 uses saxon 9 and 2.5.0 uses SaxonB 8.6.1 .. what about the latest version of saxon 9.2 Help me sorting that out



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:block[@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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.