[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Multi condition sum [Correction]


Subject: [xsl] Multi condition sum [Correction]
From: "peter verhaar" <peter.verhaar1@xxxxxxxxx>
Date: Fri, 12 Dec 2008 11:21:47 +0100

Hello,

Sorry my last message was send to early.

I have one question. assume this snippet:

<books>
 <book>
   <column name="quantity">50</column>
   <column name="status">available</column>
 </book>
 <book>
   <column name="quantity">10</column>
   <column name="status">available</column>
 </book>
 <book>
   <column name="quantity">3</column>
   <column name="status">lost</column>
 </book>
</books>


Now I want to add all Quantity IF Status = "Available".

All sum is this: sum(books/book[@name="quantity"])

but how to add the Status = "Available" condition???

Thank you


Current Thread