Bugs item #1463558, was opened at 2006-04-03 16:02 Message generated for change (Comment added) made by sjoerd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1463558&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 general Group: Pathfinder CVS Head >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Joris van Rantwijk (jvrantwijk) Assigned to: Nobody/Anonymous (nobody) Summary: wrong result when passing nodelist to function Initial Comment: It seems that I can not pass a nodelist to a user defined function if this nodelist is the result of an XPath expression: I tried the following query: declare namespace joris='http://joris.net/'; declare function joris:f($n as node()*) as node()* { $n }; joris:f( <doc><p n="aap"/><p n="noot"/><p n="mies"/></doc> // p ) and this returns: <p n="aap"/> while i expected it to return: <p n="aap"/> , <p n="noot"/> , <p n="mies"/> and in fact it does return the expected result when run on the Saxon engine. The following query however: declare namespace joris='http://joris.net/'; declare function joris:f($n as node()*) as node()* { $n }; joris:f( ( <aap/> , <noot/> , <mies/> ) ) returns: <aap/>, <noot/>, <mies/> as expected. So it seems that a nodelist passed as a function argument is sometimes, but not always, silently truncated to its first element. Tested on Pathfinder CVS head, compiled on Linux i386, gcc 3.4.4, autoconf 2.59, automake 1.9.2, libtool 1.5.6. ---------------------------------------------------------------------- >Comment By: Sjoerd Mullender (sjoerd) Date: 2007-02-19 16:37 Message: Logged In: YES user_id=43607 Originator: NO Test added. ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2006-11-29 10:59 Message: Logged In: YES user_id=572415 Originator: NO Re-opened, as no test has been provided, yet. User (submitter) and/or developer (assignee), please supply a respective test, or explain why a test is not required/possible. ---------------------------------------------------------------------- Comment By: Torsten Grust (teggy) Date: 2006-04-07 12:01 Message: Logged In: YES user_id=642632 Materialization-related bug in UDF functional call preparation. (Actual bug fix by Jan R.) ---------------------------------------------------------------------- Comment By: Torsten Grust (teggy) Date: 2006-04-07 11:31 Message: Logged In: YES user_id=642632 Hi all, an observation about this bug. Evaluating declare function local:foo($n as node()*) as node()* { $n }; let $t := <a><b/><c/><d/></a> return local:foo($t/descendant-or-self::node()/child::*) exhibits the bug mentioned by Joris: the function returns the first node </b> only. Evaluating declare function local:foo($n as node()*) as node()* { $n }; let $t := <a><b/><c/><d/></a> return local:foo($t/child::*) (which is equivalent in this particular case) returns the correct result: <b/><c/></d>. Regards, --Teggy ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1463558&group_id=56967 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
