Bugs item #1835745, was opened at 2007-11-21 12:58
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1835745&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PF/runtime
Group: Pathfinder 0.20
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hans (hans_0_)
Assigned to: Nobody/Anonymous (nobody)
Summary: XQ: recursive function call gives wrong result

Initial Comment:
version: Supersource tarball SR3.
Compiled on fedora core 5, 64-bit with 32-bits oid.


The following xquery returns an erroneous result:
The query:

declare function test($nodes as node()*) { 
for $n in $nodes[./self::a] 
let $c := test($n/*) 
where (count($c) > 0) 
order by $n/@name 
return element a { $n/@name, $c } , 
for $n in $nodes[./self::b] return $n 
}; 
test(<x><a name="1"></a><a name="2"><a name="y"><b name="2"/></a></a></x>/*) , 
test(<x><a name="1"><a name="x"/></a><a name="2"><a name="y"><b 
name="2"/></a></a></x>/*) 
<>

Returns:

<a name="2"><a name="y"><b name="2"/></a></a>, 
<a name="1"><a name="y"><b name="2"/></a></a>

Expected result is:

<a name="2"><a name="y"><b name="2"/></a></a>, 
<a name="2"><a name="y"><b name="2"/></a></a>

If the order by clause is omitted, the result is correct, except for the 
ordering.

Regards,
Hans van Rijswijk.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1835745&group_id=56967

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to