Project

Profile

Help

NPE in staticTypeCheck

Added by Anonymous over 19 years ago

Legacy ID: #2899796 Legacy Poster: marcvc (marcvc)

Michael, Got a NPE in TypeChecker.staticTypeCheck using Saxon 8.1.1. Not sure what all the scenarios are this NPE occurs. But after doing some simplifications I've been able to reduce it for one at least to something as follows: for $a in doc("a.xml")//a return for $b in doc("b.xml")//b[$a != .] order by fn:data($b) return $b I've the impression it's somehow a combination of the predicate and fn:data. The full stack trace is as follows: java.lang.NullPointerException at net.sf.saxon.expr.TypeChecker.staticTypeCheck(TypeChecker.java:76) at net.sf.saxon.functions.SystemFunction.checkArgument(SystemFunction.java:93) at net.sf.saxon.functions.SystemFunction.checkArguments(SystemFunction.java:82) at net.sf.saxon.expr.FunctionCall.analyze(FunctionCall.java:111) at net.sf.saxon.expr.LetExpression.analyze(LetExpression.java:36) at net.sf.saxon.expr.ForExpression.analyze(ForExpression.java:92) at net.sf.saxon.query.XQueryExpression.<init>(XQueryExpression.java:57) at net.sf.saxon.query.QueryParser.makeXQueryExpression(QueryParser.java:54) at net.sf.saxon.query.QueryProcessor.compileQuery(QueryProcessor.java:163) at net.sf.saxon.query.QueryProcessor.compileQuery(QueryProcessor.java:190) at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:168) at net.sf.saxon.Query.doMain(Query.java:318) at net.sf.saxon.Query.main(Query.java:69) Thanks, Marc


Replies (1)

RE: NPE in staticTypeCheck - Added by Anonymous over 19 years ago

Legacy ID: #2908339 Legacy Poster: Michael Kay (mhkay)

Thanks. This appears to have been fixed in Saxon 8.2. Michael Kay

    (1-1/1)

    Please register to reply