There's no standard way of doing dynamic XPath evaluation in XSLT (1.0 or 2.0). A number of products have an extension function, usually called xx:evaluate(). Saxon also has saxon:evaluate-node() which is designed specifically for the use case where the XPath expression is within a source document and relative to the node it is contained in. Alaternatively, call out to a selectSingleNode() or similar method in JavaScript.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference