cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dave sag <>
Subject problems passing parameters to XSL templates
Date Tue, 11 Jan 2000 19:06:45 GMT
Hi gang,

I have a small template for building the <option... bits of an html popup menu.

here it is.

	<xsl:template name="dayOption">
		 	<xsl:param name="numb"/>
	    <option value="{$numb}">
	    	<xsl:if test="date/@day = $numb">
	    		<xsl:attribute name="selected">true</xsl:attribute>
	    	</xsl:if><xsl:value-of select="$numb"/>


I call this template and pass parameters like so...

	<xsl:template name="editDate">
		<select name="date_day">
		<xsl:call-template name="dayOption"><xsl:with-param name="numb">01</xsl:with-param></xsl:call-template>
		<xsl:call-template name="dayOption"><xsl:with-param name="numb">02</xsl:with-param></xsl:call-template>
		<xsl:call-template name="dayOption"><xsl:with-param name="numb">03</xsl:with-param></xsl:call-template>

		... snip ...


		... snip ...


what I end up with is a popup menu with the word 'undefined' wherever the params are used.
 is there a known bug in the way cocoon passes params to templates, or have i done something



Dave Sag                            CEO Portable Whole Ltd

  "Software Development will soon be an Agri-business.
   Why write it when you can farm it."

  It's a whole new world in there. (req netscape or IE 4+)


View raw message