I'm not exactly sure what you want to do, but you can start by
<xsl:key name="exp" match="expression" use="cell[1]/name"/>
then
<xsl:variable name="cell" select="cell"/>
<xsl:analyze-string select="$cell" regex="\$(.*?)\$">
<xsl:matching-substring>
<xsl:variable name="exp" select="key('exp', regex-group(1), $cell)"/>
... $exp is now the selected <expression> element ...
</xsl:matching-substring>
Basically the <matching-substring> will get executed once for each $xyz$ variable in your string.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference