[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Summing grouped elements

Subject: Re: Summing grouped elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 7 Feb 2005 13:38:01 GMT
teh elements
you haven't shown enough of your stylesheet or any of your input so it's
hard to really make any suggestions, but...


   <xsl:for-each select="$referencias">

what's the definition of $referencias, and what to teh elements in that
node set look like?

     <xsl:if test="generate-id(.)=generate-id($referencias[isbn=$isbn])">

This is just true for the first element with each isbn.

         <xsl:for-each select="$referencias[isbn=$isbn]">
this selects all the elements with that isbn (probably you ought to be
using a key to speed this up)

     <xsl:sort select="../../../@name" order="ascending" />
     <xsl:sort select="../../descricao" order="ascending" />

I assume they work, without seeing your input format it's impossible to
say.


  Total: <xsl:value-of select="sum(../../vagas)" />     <--Here is my problem
  it doesn't display the total, only appear the value to a single element -->


In that case it is most likely ../../vagas only selects one element, but
we can't say as we have not seen any input.

Make a small (3 or 4  references) input file and a small complete
stylesheet and post saying what result you get and what result you want.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.