Bug #1252
closedFatal error for example from the XQuery Specification
0%
Description
SourceForge user: guggis
If you feed the XQuery engine with the recursion
example from section G.4 of the XQuery specification,
i.e. with
(: ----------------- snip ---------------------- :)
xquery version "1.0";
declare function local:swizzle($n as node()) as node()
{
typeswitch($n)
case $a as attribute(color)
return element color { fn:string($a) }
case $es as element(size)
return attribute size { fn:string($es) }
case $e as element()
return element
{ fn:local-name($e) }
{ for $c in $e/(* | @*) return local:swizzle($c) }
case $d as document-node()
return document
{ for $c in $d/* return local:swizzle($c) }
default return $n
};
(: ----------------- /snip ---------------------- :)
you get the following fatal error:
java.lang.IllegalStateException: Children of an
ExprInstruction must themselves be ExprInstructions
at net.sf.saxon.instruct.Element.analyze
(Element.java:98)
at net.sf.saxon.instruct.TraceInstruction.analyze
(TraceInstruction.java:171)
at net.sf.saxon.expr.LetExpression.analyze
(LetExpression.java:55)
at net.sf.saxon.expr.IfExpression.analyze
(IfExpression.java:75)
at net.sf.saxon.expr.IfExpression.analyze
(IfExpression.java:76)
at net.sf.saxon.expr.IfExpression.analyze
(IfExpression.java:76)
at net.sf.saxon.expr.LetExpression.analyze
(LetExpression.java:55)
at net.sf.saxon.query.XQueryFunction.compile
(XQueryFunction.java:81)
at
net.sf.saxon.query.StaticQueryContext.fixupGlobalFuncti
ons(StaticQueryContext.java:803)
at net.sf.saxon.query.QueryParser.parseQuery
(QueryParser.java:89)
at
net.sf.saxon.query.QueryParser.makeXQueryExpression
(QueryParser.java:45)
at
net.sf.saxon.query.QueryProcessor.compileQuery
(QueryProcessor.java:145)
at
net.sf.saxon.query.QueryProcessor.compileQuery
(QueryProcessor.java:172)
at net.sf.saxon.Query.doMain(Query.java:292)
at net.sf.saxon.Query.main(Query.java:58)
Fatal error during transformation: Children of an
ExprInstruction must themselves be ExprInstructions
Files
Please register to edit this issue