<xsl:variable name="source" select = "NewDataSet/Relation/Source"/>
(Where NewDataSet/Relation/Source has a value of "..//Table7").
So the value of $source is the string "..//Table7"
When I try to use this in my for-each it doesn't work.
You mean you're doing
<xsl:for-each select="$source">
Well, in XSLT 1.0, the value of the select attribute has to be a node-set and as we saw earlier the value of $source is a string. Did you imagine that the system would magically recognize that the string "../Table7" looks like a path expression and should therefore be automatically compiled and evaluated to produce a node-set?
Standard XSLT (whether 1.0 or 2.0) doesn't have any built-in capability to evaluate path expressions that are constructed at run-time from strings, or read from source documents. Many products have extensions that do this (see for example saxon:evaluate) though the details of how they handle context, namespaces, etc, varies from one product to another.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference