RE: [xsl] Filtering problems

Subject: RE: [xsl] Filtering problems
From: cknell@xxxxxxxxxx
Date: Thu, 22 Jan 2004 17:03:13 -0500
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@xxxxxxxxxx - email



-----Original Message-----
From:     Fredrik Asperud <fredrik.asperud@xxxxxxxxx>
Sent:     Thu, 22 Jan 2004 22:33:06 +0100
To:       XSL-List@xxxxxxxxxxxxxxxxxxxxxx
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



Current Thread