cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dave sag <dave....@portablewhole.com>
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"/>
	    </option>

	</xsl:template>


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 ...

		</select>

		... snip ...

	</xsl:template>

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
clotheared?

tia

dave




----------------------------------------------------------
Dave Sag                            CEO Portable Whole Ltd
dave@portablewhole.com        http://www.portablewhole.com

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

  Latest: http://www.davesag.com/motp
  It's a whole new world in there. (req netscape or IE 4+)

----------------------------------------------------------

Mime
View raw message