RE: [xsl] Re: RE: creating a string of repeated charactors

Subject: RE: [xsl] Re: RE: creating a string of repeated charactors
From: "Tim Watts" <timw@xxxxxxx>
Date: Tue, 17 Jul 2001 11:12:43 +1000
Thanks Dimitre,

for the more terse code.

Unfortumatly I do not know the max value (N) so the code won't be usefull
for me this time.

Also, just one small error in the code... the select in

<xsl:variable name="maxString" select="*************"/>
should be
<xsl:variable name="maxString" select="'*************'"/>

or it is going to look for an element called *************


Tim ;)

-----Original Message-----
From: Dimitre Novatchev

Tim Watts wrote:


> The EXSLT function <xsl:value-of select="str:padding(10, '*')" /> function
> is the sort of thing I hoped might exist in *standard* XSLT.
> Since there isn't I'll use the template that you pointed me to instead.
> (Thanks for saving me from writing it! :) )
> I was hoping that there might me a less verbose way of doing what really
> quite a simple task.

This template is "verbose" by necessity -- it solves the ***general*** case,
neither the filling characters, nor an upper limit for the length are known

It is also quite space-consuming (and time) -- because the string length is
until a larger string is constructed, this will use twice as much memory, as
necessary for the resulting string.

In many cases one knows in advance that he'll only need a string of upto N


Dimitre Novatchev.

 XSL-List info and archive:

Current Thread