you want
number-columns-spanned="{$vColSpan}"
I would also suggest
<xsl:variable name="vColSpan" select="colSpan"/>
The construct involving a child xsl:value-of element is not only more tedious to write, it's also far more expensive to execute, because it constructs a result tree fragment (two nodes and lots of overhead such as base URI, unique node identities, etc) when all you want is a number. I don't know why so many people prefer to declare variables in this inefficient way.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference