[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] apply templates with with-param on Xalan
Hi all, I have a situation where I want to appy templates and pass a parameter. Essentially, the template creates html for drop down lists and the parameter is the value of the NAME attribute of the particular list element. Parameter passing is working fine for all call-template occurances, but with the apply-templates, the param value in the template always takes the default value (ie the select value). The required template is being executed because all the lists get generated, its just that the list name gets defaulted. Does anyone have any experience in this area? Here is the match statement. The responding template is shown below. This particular list is a simple yes/no list. <xsl:template match="completely-unlet" name="completely-unlet"> <xsl:variable name="completely-unlet" select="document('rbscommon/binary-list.xml')"/> <xsl:apply-templates select="$completely-unlet"> <xsl:with-param name="pname" select="'completely-unlet'"/> </xsl:apply-templates> </xsl:template> This template matches the above <xsl:template match="list" name="list"> <xsl:param name="pname" select="'name-not-set'"/> <select name="{$pname}" class="st_select3" SIZE="1" style="width: 100px"> <xsl:apply-templates select="element"/> </select> </xsl:template> <xsl:template match="element"> <option value="{index}"/><xsl:value-of select="name"/> </xsl:template> This generates the correct drop down lists but with a defaulted name attribute. It seems that the param is working with call-template but not with apply-templates. I am using cocoon 1.7.4 Thanks Pete Marshall --== Sent via Deja.com http://www.deja.com/ ==-- Before you buy. 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
|