1 users online. Create an account or sign in to join them.Users
How can I create a for-lus with xslt?
This is an open discussion with no replies, filed under XSLT.
Search
Create an account or sign in to comment.
1 users online. Create an account or sign in to join them.Users
This is an open discussion with no replies, filed under XSLT.
Create an account or sign in to comment.
Symphony • Open Source XSLT CMS
--with-xsl)
I have created a recursion template with the help of the recurstion.mov tutorial. It works like a charm.
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" /> <xsl:template match="/"> <xsl:call-template name="recursion" /> </xsl:template> <xsl:template name="recursion"> <xsl:param name="count" select="0" /> <xsl:value-of select="$count" /> <xsl:if test="$count < 50"> <xsl:text>, </xsl:text> <xsl:call-template name="recursion"> <xsl:with-param name="count" select="$count + 10" /> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet>Now I want to create a variable and increment the variable once. Like this:
This is not working. I think it's because of the count variable already existing when I increment it. Does anyone know how I can make this work?
Another question:
How can I create a loop through a variable?