Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

count function on node testing multiple attributes

Status
Not open for further replies.

quinnseppo

Programmer
Aug 27, 2001
3
US
I'm trying to determine the count of a node, testing two attributes using boolean "AND". It works on the same node with a single attribute.

count(//detail[@projectid[.=$pId]])

Is it possible to test multiple attributes inside "count"? please help!

<xsl:for-each select=&quot;resources/resource&quot;>
<xsl:variable name=&quot;rId&quot; select=&quot;@resourceid&quot;/>
<xsl:for-each select=&quot;project&quot;>
<xsl:variable name=&quot;pId&quot; select=&quot;@projid&quot;/>
<xsl:variable name=&quot;test&quot; select=&quot;count
(//details[@projectid[.=$pId] and @resourceid.=$rId]])&quot;/>
</xsl:for-each>
</xsl:for-each>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top