Subject: [xsl] passing and retrieving parameter to a template From: "Najmi, Jamal" <Jamal.Najmi@xxxxxxxxxxx> Date: Tue, 16 Apr 2002 13:00:54 -0400 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] sub element selection, Pete . Gomez | Thread | Re: [xsl] passing and retrieving pa, Thomas B. Passin |
Re: [xsl] plain txt output tips, mjyoungblut | Date | Re: [xsl] sub element selection, Jeni Tennison |
Month |