Project

Profile

Help

Bug #5699 ยป xqbug.xq

Wolfgang May, 2022-09-29 20:57

 
for $organization in doc("http://www.dbis.informatik.uni-goettingen.de/Mondial/mondial-europe.xml")//organization
where
every $country in //country[population > 10000000]
satisfies $country = id($organization/members/@country)
(: the above syntax should be allowed but throws the error message shown below.
With this -equivalent- syntax, the query is parsed and evaluated correctly:
satisfies $country = $organization/members/id(@country)
:)
return $organization/name[1]

(:saxonXQ -s:mondial-europe.xml xqbug.xq
java.lang.NullPointerException
at net.sf.saxon.expr.parser.LoopLifter.markDependencies(LoopLifter.java:172)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:116)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:126)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:126)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:126)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:126)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:105)
at net.sf.saxon.expr.parser.LoopLifter.process(LoopLifter.java:54)
at net.sf.saxon.query.XQueryExpression.<init>(XQueryExpression.java:108)
at net.sf.saxon.Configuration.makeXQueryExpression(Configuration.java:3576)
at net.sf.saxon.query.XQueryParser.makeXQueryExpression(XQueryParser.java:187)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:562)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:624)
at net.sf.saxon.s9api.XQueryCompiler.compile(XQueryCompiler.java:650)
at net.sf.saxon.Query.compileQuery(Query.java:864)
at net.sf.saxon.Query.doQuery(Query.java:327)
at net.sf.saxon.Query.main(Query.java:103)
java.lang.NullPointerException
at net.sf.saxon.expr.parser.LoopLifter.markDependencies(LoopLifter.java:172)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:116)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:126)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:126)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:126)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:126)
at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:105)
at net.sf.saxon.expr.parser.LoopLifter.process(LoopLifter.java:54)
at net.sf.saxon.query.XQueryExpression.<init>(XQueryExpression.java:108)
at net.sf.saxon.Configuration.makeXQueryExpression(Configuration.java:3576)
at net.sf.saxon.query.XQueryParser.makeXQueryExpression(XQueryParser.java:187)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:562)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:624)
at net.sf.saxon.s9api.XQueryCompiler.compile(XQueryCompiler.java:650)
at net.sf.saxon.Query.compileQuery(Query.java:864)
at net.sf.saxon.Query.doQuery(Query.java:327)
at net.sf.saxon.Query.main(Query.java:103)
Fatal error during query: java.lang.NullPointerException: (no message)
:)
    (1-1/1)