Subject: RE: [xsl] with-param problem From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx> Date: Thu, 3 Feb 2005 17:25:51 -0600 |
Hi Wim, The variable p1 is not defined nor in scope here like others already expained. You can do however: <xsl:template match="/a"> <xsl:element name="S"> <xsl:call-template name="f"> <xsl:with-param name="p1" select="3"/> </xsl:call-template> </xsl:element> </xsl:template> <xsl:template name="f"> <xsl:param name="p1"/> <xsl:param name="p2" select="$p1 + 2"/> </xsl:template> Here, the variable p1 is in scope and is defined, and will evaluate to the value '5'. However, if this would be of value to you, I don't know. Cheers, <prs/> -----Original Message----- From: Wim Janssen [mailto:Wim.Janssen@xxxxxxxxxxxxxxxxx] Sent: Thursday, February 03, 2005 12:46 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] with-param problem Hi, I'm working on a master thesis about XSLT. I found a problem and I don't know wether it is a bug in saxon (version 8.0). Take a look a this little program <xsl:template match="/a"> <xsl:element name="S"> <xsl:call-template name="f"> <xsl:with-param name="p1" select="3"/> <xsl:with-param name="p2" select="$p1 + 2"/> </xsl:call-template> </xsl:element> </xsl:template> <xsl:template name="f"> <xsl:param name="p1"/> <xsl:param name="p2"/> </xsl:template> The problem is the param named "p2". It uses param "p1". Why is that not allowed in XSLT? Or is it maybe a bug in Saxon? I'm sorry for my terrible English! greetings Wim Janssen
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] with-param problem, Jaime Stuardo | Thread | [xsl] xsl:when, xsl:otherwise quest, Nick Roberts |
RE: [xsl] Urgent : Nested List Help, Pieter Reint Siegers | Date | RE: [xsl] namespace woes, Jarno.Elovirta |
Month |