[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Tricky inclusion match
On Tue, 29 Mar 2005 11:34:02 -0700, Karl Stubsjoen <kstubs@xxxxxxxxx> wrote: > groupa_count and groupb_count are really the collection of results > from the match on "record". So the result for group a might be: > > <groupa_count> > <value>1</value> > <value>2</value> > <value>1</value> > </groupa_count> > > The sum of group a would then be: 4 > Ummm...ok. I'm a little confused because the xslt doesn't seem to match the input you gave earlier in this thread. Also because there was some mention of you working with result tree fragments and not nodesets. That might have been a misunderstanding. But it appears that <xsl:template match="record" mode="COUNT"> > <xsl:value-of select="number(count(ancestor::recordset/record[field[@fieldname='paint'] > = current()/field[@fieldname='paint']]))"/> > </xsl:template> Returns a number, not a nodeset. Of course, I'm pretty new to xslt. Of the top of my head I would imagine something like <xsl:value-of select="sum($groupa_count/data/value)"/> should work if it is a node set like the one you described.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|