kirangentlebreeze1987 Posted February 22, 2011 Share Posted February 22, 2011 hello experts i wanted to know how to build xpath using xsl:varaiblethis is my sample <xsl:variable name="nodeid"><xsl:value-of select="/employee/employeeForm/field/@nodeValue"/></xsl:variable> <td><xsl:value-of select="/employee/employeeForm/field/@name"/></td><td><input type="text" name="id" id="{/employee/employeeForm/field/@id}" value="{$emp/employee/employeeinf/"$nodeid"}"/></td> here i use "$nodeid" in the xpath can i use some thing like that is it possible to build such a kinda expression in xslt Link to comment Share on other sites More sharing options...
Martin Honnen Posted February 22, 2011 Share Posted February 22, 2011 Don't try to construct path expressions at run-time, that is not supported in pure XSLT 1.0 and 2.0. Some processors implement "evaluate" extension functions e.g. http://manual.altova.com/AltovaXML/altovax...ova_general.htm.For you purpose doing foo/bar[local-name() = $variable] should suffice. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.