[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: using parameters in filters?
> What you want is 9probably) something more like > <xsl:apply-templates select="message[@repliedto = $filter]" /> > > together with > xslProc.addParameter("filter", "False"); argh! there's got to be a better way, this forces me to use this kind of bungled code, and I can't even use params in sort elements since they can't be contained in a if clause <snip> <xsl:template match="NewDataSet"> <table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor=""> <tr bgcolor="#eaeaea"> <td width="100" onclick="sortMessages('sender')"><div class="topbutton">Från</div></td> <td width="140" onclick="sortMessages('subject')"><div class="topbutton">Ämne</div></td> <td onclick="sortMessages('date ')"><div class="topbutton" >Skickat</div></td> </tr> </table> <table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor=""> <tr bgcolor="silver"> </tr> <xsl:choose> <xsl:when test="$filterField ='repliedto'"> <xsl:for-each select="header[RepliedTo = $filterValue]"> <xsl:sort select="$sortby" order="ascending"/> <xsl:apply-templates select="." /> </xsl:for-each> </xsl:when> <xsl:when test="$filterField ='dateread'"> <xsl:for-each select="header[not(DateRead)]"> <xsl:apply-templates select="." /> </xsl:for-each> </xsl:when> <xsl:when test="$filterField ='all'"> <xsl:for-each select="header"> <xsl:sort select="$sortby" order="ascending"/> <xsl:apply-templates select="." /> </xsl:for-each> </xsl:when> </xsl:choose> </table> </xsl:template> </snip> Best Regards --- Mattias Konradsson XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|