Depends on what you mean by "create xsl:variable dynamically". You can change the node selection path based on what is entered into a textbox. For example, in this select:
/dsQueryResponse/Rows/Row
You could dynamically choose part of that with the value from a textbox:
/*[local-name() = $valueFromTextBox]/Rows/Row
It would go something like that anyway (not sure if the syntax is 100% accurate). The key is that you use
local-name()
to choose the node based on the name, which you can compare against another variable.