Use Dynamic Mashup Expressions Inside XPath Expressions
Dynamic mashup expressions can be used in any portion of XPath expressions - as long as they are not nested. The first example defines an XPath expression to a node by evaluating the $selectedItem variable.
{$selectedItem}[matches(description, 'Ruby')
replace({$fix},{$pattern},{$new})
The second example passes string parameters to the XPath replace() function.