H
Heltende
I'm trying to develop a stylesheet that takes a parameter that is used
to filter the results. It works great *except* for the fact that I
want one of my options to be a "See All", removing any filters.
I was hoping that I could do this by setting a parameter to default to
* and then removing the parameter when the user tries to see all. It
doesn't work though.
Here's what I have:
<xslaram name="year_filter" select="*"/>
<xsl:template match="data">
....
<xsl:for-each select="holiday_list/row[year=$year_filter]">
<xsl:variable name="description" select="description"/>
....
</tr>
</xsl:for-each>
The following works:
<xsl:for-each select="holiday_list/row[year=*]">
<xsl:variable name="description" select="description"/>
....
</tr>
</xsl:for-each>
but I can't figure out how to get year_filter to equal '*'. The
problem with the first example is clear when I display the value of
$year_filter. It shows a concatenated list of all of my data.
I'm an xslt beginner, so if this is a stupid question, I beg your
forgiveness and patience!
TIA, Charles
to filter the results. It works great *except* for the fact that I
want one of my options to be a "See All", removing any filters.
I was hoping that I could do this by setting a parameter to default to
* and then removing the parameter when the user tries to see all. It
doesn't work though.
Here's what I have:
<xslaram name="year_filter" select="*"/>
<xsl:template match="data">
....
<xsl:for-each select="holiday_list/row[year=$year_filter]">
<xsl:variable name="description" select="description"/>
....
</tr>
</xsl:for-each>
The following works:
<xsl:for-each select="holiday_list/row[year=*]">
<xsl:variable name="description" select="description"/>
....
</tr>
</xsl:for-each>
but I can't figure out how to get year_filter to equal '*'. The
problem with the first example is clear when I display the value of
$year_filter. It shows a concatenated list of all of my data.
I'm an xslt beginner, so if this is a stupid question, I beg your
forgiveness and patience!
TIA, Charles