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

apply templates with with-param on Xalan

Subject: apply templates with with-param on Xalan
From: "petermarshall " <petermarshall@xxxxxxxxxxx>
Date: Mon, 24 Jul 2000 08:21:08 -0700
xalan apply templates with param
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


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.