[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Problems copying elements recursively.


Subject: Re: [xsl] Problems copying elements recursively.
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Sun, 9 Feb 2003 21:39:02 -0800 (PST)

"Imrran Wahid" <devguy2003@xxxxxxxxx> wrote in message
news:20030209234334.51979.qmail@xxxxxxxxxxxxxxxxxxxxxxxxx
> Mike,
> Pardon me for asking what may be a simple question, 
> but I am not very well versed in xsl. How do I
> translate the count to number of spaces(&#160)?

The simplest (to understand) way is to have an xsl:variable containing
a sufficiently long string of spaces. Then take the exact number of
spaces using the substring() function.

Another way (when one doesn't know the maximum possible number of
spaces that will be needed) is to use a recursive named template --
e.g. one from exslt, or this one:

http://sources.redhat.com/ml/xsl-list/2001-07/msg01040.html


Or use the "iter" template from the FXSL library.

The last solution is the most generic and can be used to implement any
iteration of the type "Do something N times".


Hope this helped.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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



Current Thread