Below is a snippet of xsl that I am trying to get to work. Firstly I am not sure if the stylesheet header is legal, and secondly even if it is strickly legal will it work for what I want to do?

All I am trying to do is use a variable that was declared somewhere else in a template for the entry tag. Rather than printing the number 2 between two sets of XX, number 2 is printed at the point where I want it to assign the variable. Any help greatly apprieciated.

   Thanks
       Ron.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
                xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
                version="1.0"
                xmlns:data="any-uri" >

[Other Templates Deleted......]

<xsl:template match="ENTRY">
        <xslt:variable name="spancols">2</xslt:variable>
        <TD>
        XX
        <xslt:copy-of select="$spancols"/>
        XX
        <xsl:apply-templates />
        </TD>
</xsl:template>

</xsl:stylesheet>