XPath problem with Saxon 8-1b
Added by Anonymous about 20 years ago
Legacy ID: #2783321 Legacy Poster: David Ufton (noontide)
I am getting an ArrayIndexOutOfBoundsException when trying to evaluate XPath expressions which contain further XPath expressions inside conditionals. The exception is: java.lang.ArrayIndexOutOfBoundsException: 1 at net.sf.saxon.expr.XPathContextMajor.setLocalVariable(XPathContextMajor.java:213) at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:60) at net.sf.saxon.xpath.XPathEvaluator.evaluate(XPathEvaluator.java:183) My example XML is: <?xml version="1.0" encoding="UTF-8"?> <Test> <Book id="1"> <Title>The Two Towers</Title> <AuthorRef id="3"/> </Book> <Book id="2"> <Title>The Hitchikers Guide to the Galaxy</Title> <AuthorRef id="4"/> </Book> <Author id="3"> <Name>J.R.R. Tolkien</Name> </Author> <Author id="4"> <Name>Douglas Adams</Name> </Author> </Test> examples of XPaths which fail: /Test/Author[@id=/Test/Book[1]/AuthorRef/@id]/Name /Test/Author[@id=/Test/Book[Title="The Two Towers"]/AuthorRef/@id]/Name Apologies for the formatting!
Replies (2)
RE: XPath problem with Saxon 8-1b - Added by Anonymous about 20 years ago
Legacy ID: #2783378 Legacy Poster: David Ufton (noontide)
By the way, these expressions work fine in Saxon 8.0. Cheers! David Ufton
RE: XPath problem with Saxon 8-1b - Added by Anonymous about 20 years ago
Legacy ID: #2783419 Legacy Poster: Michael Kay (mhkay)
Thanks for reporting this. I have registered the problem and a source fix at http://sourceforge.net/tracker/index.php?func=detail&aid=1037892&group_id=29872&atid=397617
Please register to reply