Subject: RE: [xsl] Having trouble, please help... From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 9 Apr 2001 16:55:46 +0100 |
Hi, I think you use local-name() but Im not sure ;-) cheers -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Daniel Newman Sent: 09 April 2001 15:13 To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Having trouble, please help... I've got the following XSL template. I want to pass it four parameters. One for the ParentNode it should select, one for the CurrentNode to select, and two other text based values. I use the following code to implement the template: <xsl:call-template name="PrintRows"> <xsl:with-param name="ParentNode">RetrieveNameAndAddressRSResponse</xsl:with-param> <xsl:with-param name="CurrentNode">NameAddress1</xsl:with-param> <xsl:with-param name="RowColor">#FFEBBF</xsl:with-param> <xsl:with-param name="DisplayText">Holder Name:</xsl:with-param> </xsl:call-template> and the template looks like this: <xsl:template name="PrintRows"> <xsl:param name="ParentNode" /> <xsl:param name="CurrentNode" /> <xsl:param name="RowColor" /> <xsl:param name="DisplayText" /> <tr> <td bgcolor="{$RowColor}" valign="top" width="45%"> <b><font face="Arial, Helvetica, sans-serif" size="2"> <xsl:value-of select="$DisplayText" /> </font></b> </td> <td bgcolor="{$RowColor}" width="45%"><font face="Arial, Helvetica, sans-serif" size="2"> <xsl:apply-templates select="RetrieveNameAndAddressRSResponse/NameAddress1"> </xsl:apply-templates> </font></td> <td bgcolor="#000066" width="5%"><br/></td> <td bgcolor="#FF9933" width="5%"><br/></td> </tr> </xsl:template> Now in the above example, everything is fine, but I need to replace the apply-templates line with something using the two parameters passed. Whenever I do <xsl:apply-templates select="$ParentNode"> I get a "Reference to variable or parameter 'ParentNode' must evaluate to a node list", but when I use <xsl:apply-templates select="RetrieveNameAndAddressRSResponse"> It works fine. So my question is: How can I get <xsl:apply-templates select="RetrieveNameAndAddressRSResponse/NameAddress1"> when using <xsl:apply-templates select="$ParentNode/$CurrentNode"> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Having trouble, please help.., Daniel Newman | Thread | RE: [xsl] Having trouble, please he, Michael Kay |
Re: [xsl] XPath/Context problem, Paul_Dick | Date | [xsl] Re-visiting a Child Node, Daniel Newman |
Month |