Dynamically evaluate XPath stored in a variable
问题 I have a variable: <xf:var name="xpath" value="/my/xpath/expression"/> and I want to use /my/xpath/expression in the ref attribute of <xf:input> : <xf:input ref="/my/xpath/expression"/> Here I use a hardcoded XPath expression, but I want instead to use the XPath expression stored in the $xpath variable instead, something like this : <xf:input ref="$xpath"/> How can this be achieved? 回答1: What you probably mean is that the value of $xpath is a string, literal or not, which you then want to