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
Updated by Anonymous about 20 years ago
SourceForge user: mhkay
Logged In: YES
user_id=251681
This appears to be a duplicate of 981277.
There's bright yellow box on the "submit new bug" page that
asks you not to make an entry here except for confirmed
bugs. Apart from anything else, SourceForge is very
unreliable about notifying me of new entries in this section
(which is why it has taken several days for me to respond -
I only noticed the entry by chance). Please submit suspected
bugs using the saxon-help list or forum, or the "support
requests" tracker.
Michael Kay
Please register to edit this issue