I usually don't reply when people say the problem is urgent, because I prefer giving answers if I think people will have time to study them properly. But I'll make an exception.
1. Data/@ref
2. translate(Data/@ref, '#', '')
3. key('Start', translate(Data/@ref, '#', '')) where you have defined
<xsl:key name="Start" match="Start" use="@refer"/>
4. This just repeats steps 2 and 3 so you already know how to do it.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference