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

passing and retrieving parameter to a template

Subject: passing and retrieving parameter to a template
From: "Najmi, Jamal" <Jamal.Najmi@xxxxxxxxxxx>
Date: Tue, 16 Apr 2002 13:00:54 -0400
passing parameter and retrieving it
I have a variable defined in one template.  This variable actually contains
the value of an attribute.  I am passing the value of this variable as a
parameter to another template.  But when I retrieve the value of the
variable it is empty.

I have been banging my head for a while on this.  Please help!!

Thanks 


Jamal

Following is the code snippet:

<xsl:template
match="/xs:schema/xs:element/xs:complexType/xs:sequence/xs:element">
        <xsl:variable name="sectionShortName"><xsl:value-of
select="./@name"></xsl:value-of></xsl:variable>  //assigning value
     <h1><xsl:value-of
select="/xs:schema/xs:annotation/xs:appinfo/dne:template/dne:constrainedElem
ent[@name=$sectionShortName]/dne:constraint/@label"/></h1>
     <blockquote>
    <blockquote>
     <blockquote>
     <p>&#160;</p>
     <table width="64%" border="0" align="center">
      <xsl:value-of select = "$sectionShortName" /> 
      <xsl:apply-templates>
           <xsl:with-param name = "sectionShortNameParam"
select="$sectionShortName"/>    // passing value
       </xsl:apply-templates>
      </table>
        <p>&#160;</p>
      </blockquote>
    </blockquote>
  </blockquote>
</xsl:template>
<xsl:template
match="/xs:schema/xs:element/xs:complexType/xs:sequence/xs:element/xs:comple
xType/xs:sequence/xs:element">
       <xsl:param name = "sectionShortNameParam" />            // declaring
local parameter
       <xsl:value-of select = "$sectionShortNameParam" />   // retrieving
value



 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-2011 All Rights Reserved.