Sharepoint Designer XSLT count boolean node = true

Posted by Heather Masters on Stack Overflow See other posts from Stack Overflow or by Heather Masters
Published on 2011-01-05T16:25:14Z Indexed on 2011/01/05 22:54 UTC
Read the original article Hit count: 197

Filed under:
|
|
|

I have a SharePoint list I converted to XSLT to do some additional grouping and counting and percentages. I need to return the number of items = true within my nodeset, I have:

<xsl:value-of select="count($nodeset/@PartnerArrivedAtCall)"/>    

(which returns the count of all the nodes)

I have tried

<xsl:value-of select="count($nodeset/@PartnerArrivedAtCall
                                        [@PartnerArrivedAtCall = 'Yes'])"/>

(returns zero)

and

<xsl:variable name="ArrivedYes"
              select="$nodeset/@PartnerArrivedAtCall
                                  [@PartnerArrivedAtCall='Yes']"/>

(also returns zero)

Can you please give me a good example of how to count only the true values (in my XML, true = "Yes")

Thanks!

© Stack Overflow or respective owner

Related posts about xslt

Related posts about xpath