Subject: RE: [xsl] Multi condition sum [Correction] From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Fri, 12 Dec 2008 11:10:56 -0000 |
sum(book[column[@name='status']='available']/column[@name='quantity']) Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: peter verhaar [mailto:peter.verhaar1@xxxxxxxxx] > Sent: 12 December 2008 10:22 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Multi condition sum [Correction] > > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Multi condition sum [Corr, Christoph Naber | Thread | [xsl] complex numbering problem, Alexander Koenig |
Re: [xsl] Multi condition sum [Corr, Christoph Naber | Date | [xsl] complex numbering problem, Alexander Koenig |
Month |