XSLT 2.0 stransfer data between template

vbxDD

New Member
I want know it is possible to transfer a variable in template and get value. For example set variable in template A and get value in template B ?I try to use call-template but i don't get value.\[code\]<xsl:template name="Transf"> <xsl:param name="T1"/> <xsl:value-of select="$T1"/></xsl:template><xsl:template match='director/filmDirectors'> <xsl:call-template name="Transf"> <xsl:if test="filmDirector='Allen Woody'"> <xsl:value-of select="@id"/><xsl:with-param name="T1" select="@id"/> </xsl:if> </xsl:call-template></xsl:template><xsl:template match='movie/titles'> <xsl:call-template name="Transf"> <xsl:with-param name="T1"><xsl:value-of select="tile[@id=$T1]"/></xsl:with-param> </xsl:call-template></xsl:template>\[/code\]XML file\[code\]<list> <director> <filmDirectors> <filmDirector id="steve-s"> <lname>Spielberg</lname> <lfirstname>Steven</lfirstname> </filmDirector> <filmDirector id="woody-a"> <lname>Allen<lname> <lfirstname>Woody</lfirstname> </filmDirector> <filmDirectors></director><movie> <titles> <title id="steve-s">Jurassic Park</title> </titles> <titles> <title id="woody-a">Small Time Crooks</title> </titles></movie>\[/code\]Can you give me advice ?Thank you in advance your reply.
 
Back
Top