Subject: Re: [xsl] Print number of chars depending upon int value From: Elliotte Harold <elharo@xxxxxxxxxxxxxxx> Date: Fri, 22 Apr 2005 07:11:08 -0400 |
select="substring('...................................', 1, $myLength)"/> should do the trick!
But if $myLength is greater than the number of chars in the string?
<xsl:template match="/"> <xsl:call-template name="dots"> <xsl:with-param name="count">100</xsl:with-param> </xsl:call-template> </xsl:template>
<xsl:if test="$count > 0"> <xsl:text>.</xsl:text> <xsl:call-template name="dots"> <xsl:with-param name="count" select="$count -1"/> </xsl:call-template> </xsl:if>
-- Elliotte Rusty Harold elharo@xxxxxxxxxxxxxxx XML in a Nutshell 3rd Edition Just Published! http://www.cafeconleche.org/books/xian3/ http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Print number of chars dep, David Carlisle | Thread | Re: [xsl] Print number of chars dep, Ranjan K. Baisak |
Re: [xsl] Print number of chars dep, David Carlisle | Date | Re: [xsl] Print number of chars dep, Ranjan K. Baisak |
Month |