I have a template with a parameter. How can I print something n times?
n is the value of the parameter. I must use XSLT 1.0…
There’s a cleaner way insted of this:
<xsl:for-each select="//*[position() <= $count]">	</xsl:for-each>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your approach will work if your source XML has
$countelements, but I wouldn’t say that’s a very good way to go about it. This is a lot more verbose, but I’d suggest defining a template like this:Then you would call this template using: