[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Filtering problems

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.