[Forwarding to list.] > -----Original Message----- > From: Amanda Galtman > Sent: Monday, January 09, 2012 8:31 AM > To: 'Olivier JEULIN' > Subject: RE: [Qizx] Incorrect result when using predicate expression > > Hi Olivier, > > Thank you for the quick reply, and the correction and suggestion. I tried the > following > and still get "1"s among the results, in versions 4.2 and 4.4. > > Query #1 > for $node in //refentry[count(descendant-or-self::relatedlinks)=0] > return (count($node//relatedlinks)) > > Query #2 > for $node in //refentry[count(.//relatedlinks)=0] > return (count($node//relatedlinks)) > > Query #3 > for $node in //refentry[count(descendant-or-self::relatedlinks)=0] > return (count($node/descendant-or-self::relatedlinks)) > > (The results are the same across all three queries and two versions.) > > Thank you, > Amanda > > > > > -----Original Message----- > > From: Olivier JEULIN [mailto:[email protected]] > > Sent: Monday, January 09, 2012 7:31 AM > > To: Amanda Galtman > > Subject: Re: [Qizx] Incorrect result when using predicate expression > > > > Le 08/01/2012 13:36, Amanda Galtman a écrit : > > > > Hi, > > > > I believe the following query should not produce any "1"s in the result. > > However, it produces a small number of "1"s along with the many correct > > "0"s. > > > > for $node in //refentry[count(descendant::relatedlinks)=0] > > return (count($node//relatedlinks)) > > > > I first saw a problem like this in Qizx Studio 4.2. I tried the same > > thing in Qizx > > Studio 4.4, with the same result. > > > > I tried this variation, and it produced the expected result of all "0"s. > > > > for $node in //refentry > > where (count($node//relatedlinks)=0) > > return (count($node//relatedlinks)) > > > > > > > > Your queries are different: // is a synonym for descendant-or-self > > Try the first query with "descendant-or-self::relatedlinks" (or > > ".//relatedlinks") > instead > > of "descendant::relatedlinks", if there still are "1", this is a bug. > > > > > > -- > > > > > > Olivier JEULIN > > Chef de projet > > [email protected] > > Tél: +33 (0)1 41 05 22 00 > > > > > > > > 42, rue de Villiers > > 92532 Levallois cedex > > www.efl.fr
-- Qizx Support List [email protected] http://www.xmlmind.com/mailman/listinfo/qizx-support

