|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Summing grouped 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
________________________________________________________________________
|
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
|

Cart








