|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] passing and retrieving parameter to a template
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> </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> </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
|
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
|

Cart








