I haven't tried to follow the logic in detail. But there's some obvious nonsense here:
<xsl:variable name="logo" select="'fcs:logo/@source'+'/'+'$logoimage'"/>
Firstly, "+" does not do string concatenation in XPath. You want the concat() function. Secondly, there doesn't seem to be any reason to put the first expression in quotes.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference