It seems the easiest and most flexible for me.
For XSLT 1.0 (or possibly 1.1).
<xsl:variable name="count">10</xsl:variable> <xsl:variable name="repeat"><xsl:text>	</xsl:text></xsl:variable> <xsl:sequence select="string-join((for $i in 1 to $count return $repeat),'')"/>
Of course, the count variable is for assigning your parameter n .
I used the repeat variable to hold the tab character, but you can just replace the $ repeat character with the single quote tab character in the sequence element. Note: This variable can be longer than 1, which creates a whole bunch of possibilities.
It does not use recursion, so it will not work in the recursion limit.
I donโt know what maximum value you can use for counting, but I tested it up to 10,000.
Brad shockley
source share