|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Converting a string to node test
Hi everyone, I have crafted a template for a specific situation, and I'd like to make it more generic. It involves a node test that should entirely depend on variables and param. But the left member of the node test doesn't want to be made less static: <xsl:call-template name="generic"> <xsl:with-param name="x" select="my-element"/> <xsl:with-param name="y" select="'my-attrib-name'"/> </xsl:call-template> <xsl:template name="generic"> <xsl:param name="x"/> <xsl:param name="y"/> <xsl:variable name="z" select="'my attribute value'"/> <!-- This line works --> <xsl:copy-of select="$x[@my-attrib-name=$z]/node()"/> <!-- This line doesn't, nor any line of that kind I've tried... --> <xsl:copy-of select="$x[@$y=$z]/node()"/> </xsl:template> Do you know the secret? Thanks, Xavier. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








