[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: with-param problem
The elements that declare variables are called variable binding elements. These are xsl:variable and xsl:param. The xsl:with-param element is not a variable binding element; it does not declare a variable. Rather it assigns a value to the variable declared in the xsl:param element of the called template. Therefore, you can't reference $p1 in the second with-param. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Wim Janssen [mailto:Wim.Janssen@xxxxxxxxxxxxxxxxx] > Sent: 03 February 2005 18:46 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: 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
|
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
|