I need a way to carry a value from one template to another in my XSLT form.
I thought I could use a variable but that doesn't work as after I assign it in one template the value is gone as soon as a leave the template.
If I do:
<xsl:stylesheet
xmlns:xsl=" version="1.0">
<xslutput method="xml" indent="yes"/>
<xslaram name="mainForm" select="Testing"/>
The value seems to not really be there but if I set it in a template:
<xsl:template match="REPORT">
<xsl:variable name="mainForm" select="@AppraisalFormType"/>
@mainForm = <xsl:value-of select="$mainForm"/>
@AppraisalFormType = <xsl:value-of select="@AppraisalFormType"/>
</xsl:template>
It is set inside the template but will be gone when I leave.
I need to get a value that I can get from one template and then use it in other templates.
Is there a way to do this in XSLT?
Thanks,
Tom
I thought I could use a variable but that doesn't work as after I assign it in one template the value is gone as soon as a leave the template.
If I do:
<xsl:stylesheet
xmlns:xsl=" version="1.0">
<xslutput method="xml" indent="yes"/>
<xslaram name="mainForm" select="Testing"/>
The value seems to not really be there but if I set it in a template:
<xsl:template match="REPORT">
<xsl:variable name="mainForm" select="@AppraisalFormType"/>
@mainForm = <xsl:value-of select="$mainForm"/>
@AppraisalFormType = <xsl:value-of select="@AppraisalFormType"/>
</xsl:template>
It is set inside the template but will be gone when I leave.
I need to get a value that I can get from one template and then use it in other templates.
Is there a way to do this in XSLT?
Thanks,
Tom