[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: About <xsl:param> and <xsl:with-param>
Hi, >In the next xsl I want to make that the param "cod" be >incremented in each time that the <xsl:for-each> cicle >occurs, but it's result is an error you can not incriment the variables in XSLT. it's not possible in XSLT, because you can't reassign the value of a variable.. You may use other techniques like recursive templates to solve your problem.. or If you tell what your requirement is , some one in the list can definitely help you out. ><xsl:with-param name="cod" select="number($cod+1)"/> This is a wrong usage of xsl:with-param .. <xsl:with-param > is used when calling a template by using either <xsl:call-templates> or <xsl:apply-templates> . a typical use of <xsl:param> and <xsl:with-param> : <xsl:template match="/"> <xsl:call-template name="my-template"> <xsl:with-param name="param1" select="'param1 value'"/> <xsl:with-param name="param2" select="'param2 value'"/> </xsl:call-template> </xsl:template> <xsl:template name="my-template"> <xsl:param name="param1"/> <xsl:param name="param2"/> Param Values : <xsl:value-of select="$param1"/> and <xsl:value-of select="$param2"/> </xsl:template> HTH Vasu 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
|