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

parameter problems

Subject: parameter problems
From: "Mark Edwards" <medwards@xxxxxxxxx>
Date: Sat, 7 Jul 2001 14:00:51 +1000
parameter problems
hi.

I have a stylesheet fragment here....

<xsl:template match="faqs">
	<table border="2" width="100%">
		<tr><td>
			<xsl:apply-templates select="faq">
				<xsl:with-param name="fmt">
					<xsl:value-of select="'yes'" />
				</xsl:with-param>
			</xsl:apply-templates>
		</td></tr>
		<tr><td>
			<xsl:apply-templates select="faq" >
				<xsl:with-param name="fmt">
					<xsl:value-of select="'no'" />
				</xsl:with-param>
			</xsl:apply-templates>
		</td></tr>
	</table>
</xsl:template>

<xsl:template match="faq">
	<xsl:choose>
		<xsl:when test="$fmt='yes'">
			<b><xsl:value-of select="question"/></b><br />
		</xsl:when>
		<xsl:otherwise>
			<b><xsl:value-of select="question"/></b><br />
			<xsl:value-of select="answer"/><br />
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>

however my XSLT transformer cannot recognise the variable '$fmt'. 
Please forgive what may be an obvious question - I'm new to this... but....
Am I doing something wrong here?

If have also tried:

	<xsl:with-param name="fmt" select="'yes'" />

instead of

	<xsl:with-param name="fmt">
		<xsl:value-of select="'yes'" />
	</xsl:with-param>


Any help would be much appreciated.

Mark.

 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.