Having issues getting this to work. Can some one assist me?
<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
<xsl:variable name="RowsWithFilter" >
<xsl:choose>
<xsl:when test="string-length($QSCategory) != 0 and string-length($QSSubCategory) = 0">
<xsl:value-of select="/dsQueryResponse/Rows/Row[contains(normalize-space(@Category),$QSCategory)]"></xsl:value-of>
<xsl:variable name="FilterCount" select="count(/dsQueryResponse/Rows/Row[contains(normalize-space(@Category),$QSCategory)])"></xsl:variable>
</xsl:when>
<xsl:when test="string-length($QSCategory) = 0 and string-length($QSSubCategory) != 0">
<xsl:value-of select="/dsQueryResponse/Rows/Row[contains(normalize-space(@Subcategory),$QSSubCategory)]"></xsl:value-of>
<xsl:variable name="FilterCount" select="count(/dsQueryResponse/Rows/Row[contains(normalize-space(@Subcategory),$QSSubCategory)])"></xsl:variable>
</xsl:when>
<xsl:when test="string-length($QSCategory) != 0 and string-length($QSSubCategory) != 0">
<xsl:value-of select="/dsQueryResponse/Rows/Row[contains(normalize-space(@Category),$QSCategory) and contains(normalize-space(@Subcategory),$QSSubCategory)]"></xsl:value-of>
<xsl:variable name="FilterCount" select="count(/dsQueryResponse/Rows/Row[contains(normalize-space(@Category),$QSCategory) and contains(normalize-space(@Subcategory),$QSSubCategory)])"></xsl:variable>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/dsQueryResponse/Rows/Row"></xsl:value-of>
<xsl:variable name="FilterCount" select="count(/dsQueryResponse/Rows/Row)"></xsl:variable>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--Find the number of rows depending on the existence of the parameter-->
<!--<xsl:variable name="dvt_RowCount" select="count($Rows)" />-->
<xsl:variable name="dvt_RowCount">
<xsl:choose>
<xsl:when test="string-length($QSCategory) = 0">
<xsl:value-of select="count($Rows)"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="count($FilterCount)"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>