|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Counting Nodes Based on Conditional Statements
Hi Michael,
<xsl:template match="/"> <div class="line"></div> You could _first_ determine the list catching it in a variable and _then_ get the count and loop over them. <xsl:variable
name="books"
select="catalog/category/topic/book
[$status = 'All'
or ($status = 'Purchased' and @status = 'Purchased')]
[$category = 'All'
or ($category = ../../@name and ($topic = ../@name or $topic = 'All'))]" />(sorry for the silly indentation) <xsl:choose>
<xsl:when test="count($books) = 0">
<!-- sorry no books -->
</xsl:when>
<xsl:otherwise>
<!-- count($books) shown! -->
<xsl:for-each select="$books">
<!-- presentation of books -->
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>Grtz, Geert
|
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








