
Hi Paul, This is a problem in Saxon 8.1.1 used by oXygen for XPath 2.0 support. When invoked from command line it gets the same exception [1]. We patched the XPathEvaluator class and now it works correctly. To get the fix in oXygen just drop the attached saxon-XPathPatch.jar in your [oXygen]/lib folder or, if you are on a Mac in oxygen.app/Contents/Resources/Java. Let us know if you encounter any difficulties with this patch. Also please subscribe to the list to have your emails posted automatically without administrator approval. [1] E:\workspace\oXygen>java -cp lib/saxon8.jar net.sf.saxon.xpath.XPathEvaluator build.xml "for $i in //target return $i" Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 at net.sf.saxon.expr.XPathContextMajor.setLocalVariable(XPathContextMajor.java:213) at net.sf.saxon.expr.ForExpression$MappingAction.map(ForExpression.java:208) at net.sf.saxon.expr.MappingIterator.next(MappingIterator.java:64) at net.sf.saxon.xpath.XPathEvaluator.evaluate(XPathEvaluator.java:186) at net.sf.saxon.xpath.XPathEvaluator.main(XPathEvaluator.java:284) Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Paul Hermans wrote:
XPath expression
for $i in //cat:OrderLine return data($i/cat:Quantity)
returns
class java.lang.Array Index Out Of Bounds Exception 1
The same path works on the same file in other tools.
Regards,
Paul
------------------------------------------------------------------------
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user