xsl-list
[Top] [All Lists]

Re: creating a string after counting charatercs

2003-01-07 05:43:32
Hello Julia,

if you have a max length of the string, you can do one of the following:

<xsl:value-of select="translate($string, $string, '____________________')"/>

<xsl:value-of select="substring($string, 0, $string-length)"/>

If the string length is undefined, you can use a recursive template.

Regards,

Joerg


jfi(_at_)propack-data(_dot_)com wrote:
Hi,

I´ve got the following problem: I want to check an attribute value for its
length (e.g. 17 chars) and then create a string with 17 identical
characters, like
"_________________". The string-length check on my attribute works pretty
well, but how do I get the string?

TIA,
Julia

--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg(_dot_)heinicke(_at_)virbus(_dot_)de
www.virbus.de


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list