Project

Profile

Help

Unknown node kind in NodeKindTest

Added by Anonymous almost 19 years ago

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

Michael, The following query (smallest reproducable I was able to come up with) works fine against Saxon 8.4, but fails with 8.5. The issue seems to be related with an optimization new to Saxon 8.5? for $v in (1,2) return <e>{1 + (doc("foo.xml")/foo)[1 = 2]}</e> Results in the following error: Unknown node kind in NodeKindTest Thanks, Marc


Replies (3)

Please register to reply

RE: Unknown node kind in NodeKindTest - Added by Anonymous almost 19 years ago

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

Could you please supply a copy of the source document that triggered this error? (My suspicion is that it's something to do with the new "parent pointers" introduced into the TinyTree for performance reasons). Thanks, Michael Kay

RE: Unknown node kind in NodeKindTest - Added by Anonymous almost 19 years ago

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

Michael, actually, I don't have a foo.xml document. The exception is thrown statically. I see the following stack trace: java.lang.IllegalArgumentException: Unknown node kind in NodeKindTest at net.sf.saxon.pattern.NodeKindTest.makeNodeKindTest(NodeKindTest.java:55) at net.sf.saxon.pattern.NodeTest.getPrimitiveItemType(NodeTest.java:78) at net.sf.saxon.expr.ArithmeticExpression.typeCheck(ArithmeticExpression.java:157) at net.sf.saxon.expr.UnaryExpression.typeCheck(UnaryExpression.java:46) at net.sf.saxon.expr.LetExpression.typeCheck(LetExpression.java:47) at net.sf.saxon.expr.ForExpression.extractLoopInvariants(ForExpression.java:219) at net.sf.saxon.expr.ForExpression.optimize(ForExpression.java:160) at net.sf.saxon.query.XQueryExpression.<init>(XQueryExpression.java:62) at net.sf.saxon.query.QueryParser.makeXQueryExpression(QueryParser.java:79) at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:261) at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:315) at net.sf.saxon.Query.doMain(Query.java:348) at net.sf.saxon.Query.main(Query.java:75) Fatal error during transformation: Unknown node kind in NodeKindTest Thanks, Marc

RE: Unknown node kind in NodeKindTest - Added by Anonymous almost 19 years ago

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

Thanks for the extra info. This problem demonstrates that Saxon is having difficulty with type inferencing when it is able to determine statically that a subexpression returns an empty sequence. The patches at: https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1251814&amp;group_id=29872&amp;atid=397617 deal with this example and some closely related examples, though I'm not confident that they are a 100% solution. MK

    (1-3/3)

    Please register to reply