XPath problem with Saxon 8-1b

  • David Ufton

    David Ufton - 2004-09-30

    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"?>
    <Book id="1">
    <Title>The Two Towers</Title>
    <AuthorRef id="3"/>
    <Book id="2">
    <Title>The Hitchikers Guide to the Galaxy</Title>
    <AuthorRef id="4"/>
    <Author id="3">
    <Name>J.R.R. Tolkien</Name>
    <Author id="4">
    <Name>Douglas Adams</Name>

    examples of XPaths which fail:


    /Test/Author[@id=/Test/Book[Title=\&quot;The Two Towers\&quot;]/AuthorRef/@id]/Name

    Apologies for the formatting!


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks