I have an XPath string as follows:
/results/server[@name='server1']
I would like to construct a new XPath using a previously defined XSLT variable:
/results/server[@name='$server']
I haven't tried 'concat' might be possible with that. I am using XSLT 2.0. XSLT parser complains if I use the string as defined above:
XPST0003 XPath syntax error at char 65 on line 89 near: Unexpected token "" in path expression
You can refer to the variable anywhere in the XPath expression:
If you write it with quotes,
'$server', then it is just a string literal that happens to contain a dollar sign.