|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Re: RE: creating a string of repeated charactors
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 ************* Cheers, Tim ;) -----Original Message----- From: Dimitre Novatchev Tim Watts wrote: [snip] > 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 is > quite a simple task. This template is "verbose" by necessity -- it solves the ***general*** case, when neither the filling characters, nor an upper limit for the length are known in advance. It is also quite space-consuming (and time) -- because the string length is doubled 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 characters. [snip] Cheers, Dimitre Novatchev. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








