RE: RE: RE: RE: [xsl] get variable value in another template

Subject: RE: RE: RE: RE: [xsl] get variable value in another template
From: cknell@xxxxxxxxxx
Date: Wed, 28 Dec 2005 13:02:22 -0500
So to clarify in terms of my example stylesheet,
This works:

 <xsl:template name="T1">
   <xsl:variable name="V1">rocket</xsl:variable>
   <r><xsl:value-of select="$V1" /></r>
 </xsl:template>

While this throws up an error:

 <xsl:template name="T1">
   <r><xsl:value-of select="$V1" /></r>
   <xsl:variable name="V1">rocket</xsl:variable>
 </xsl:template>

Yes, that's perfectly reasonable. Unfortunately, "clarifying" a remark with ambiguous (if technically correct) language doesn't aid the original poster (OP) in understanding the problem.

I think OP has a problem understanding the scope concept in XSLT. I was hoping to get OP to post a more direct and concise explanation of the problem so that we could aid in resolving it.
--
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Florent Georges <darkman_spam@xxxxxxxx>
Sent:     Wed, 28 Dec 2005 18:13:58 +0100 (CET)
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  RE: RE: RE: [xsl] get variable value in another template

cknell@xxxxxxxxxx wrote:

Is the xsl:template element with the name attribute
value of "T2" on the following-sibling axis of the
xsl:template element with the name attribute of "T1"?

I guess Mike spook about 'template' as in XSLT 1.0 REC. You can say 'sequence constructor' instead. The following-siblings are those of the xsl:variable element.

--drkm























___________________________________________________________________________ Nouveau : tiliphonez moins cher avec Yahoo! Messenger ! Dicouvez les tarifs exceptionnels pour appeler la France et l'international.
Tilichargez sur http://fr.messenger.yahoo.com


Current Thread