Subject: [xsl] Converting a string to node test From: Xavier Cazin <cazinx@xxxxxxxxx> Date: 21 Apr 2001 11:49:33 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl:with-param select="X" doe, Robert Nicholson | Thread | Re: [xsl] Converting a string to no, Jeni Tennison |
Re: [xsl] XML source with DOCTYPE d, Jeni Tennison | Date | Re: [xsl] HTML in XML not getting t, b1hjcl79 |
Month |