Here's one approach.
<xsl:choose>
<xsl:when test="$filter='*'">
<xsl:for-each select="ar/isr">
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="ar/isr[omr=$filter]">
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
Without knowing which processor you are using or exactly how the parameter is
formatted, I can't think of any other way.
--
Charles Knell
cknell(_at_)onebox(_dot_)com - email
-----Original Message-----
From: Fredrik Asperud <fredrik(_dot_)asperud(_at_)telia(_dot_)com>
Sent: Thu, 22 Jan 2004 22:33:06 +0100
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Filtering problems
I'm doing some filtering by passing a parameter into the xsl via the URL.
<xsl:for-each select="ar/isr[omr=$filter]">
It works fine except when I'm trying to use a wildcard by passing * into
"filter" which results in no hits.
If I do like this <xsl:for-each select="ar/isr[omr=*]"> the * works like
wildcard and everthing gets listed without filtering.
Is it possible to pass a wildcard with the parameter or can I solve this
in some other way?
/Fredrik
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list