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

RE: filter based on parameter, not getting it.

Subject: RE: filter based on parameter, not getting it.
From: "Passin,Thomas B. (Tom)" <tpassin@xxxxxxxxxxxx>
Date: Fri, 20 Sep 2002 16:27:21 -0400
tom thomas filter
[Carter, Will]

> This code doesn't work:

> <table>
> 	<xsl:for-each select="$filter">

<!--===============================================
	Here is the problem.  The variable is out of scope - it is only
in scope in your xsl:when or xsl:otherwise element.  Therfore the
variable does not
exist for the code below.
   ==================================================-->


> 	<tr>
> 		<td><xsl:value-of select="cat"/></td>
> 		<td><xsl:value-of select="dog"/></td>
> 		<td><xsl:value-of select="fish"/></td>
> 	</tr>
> 	</xsl:for-each>
> </table>
> ---------------------------------------------------------

Restructure your stylesheet so that you call a named template (or
apply-templates) to create the table cells, and pass in the $filter
variable as a parameter to the template.

Cheers,

Tom P

 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.