I am new to xslt, Though I manage to work on it. But I struck with one case for which I need a help from expert. I am trying to finding the node which is Exists or not. I already search this same question, in which I didn't get the expected answer. I am having a node, MainNode->SubNode1->SubNode2->SunNode3. If I am checking like below
<xsl:if test= "not(//MainNode/SubNode1/SubNode2/SunNode3)">
Which is working, but if same I converts in to Variable, as below
<xsl:if test= "not(//MainNode/$Var1/$Var2/SunNode3)">
where, Var1 = SubNode1, Var2 = SubNode2
Why it is not working. I can't use Variable in path searching. If not what is the solution for this.