Re: Iteration in XSL

Subject: Re: Iteration in XSL
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Mon, 17 Jan 2000 17:14:46 +0100
You need to use recursivity.

For example :

---------- XML file : ----------
<?xml version='1.0' encoding='ISO-8859-1'?>

---------- XSL file : ----------
<xsl:stylesheet xmlns:xsl="";>

<xsl:template match="index" name="index">
<xsl:param name="idx" select="normalize-space()"/>
<xsl:if test="$idx &gt; 0">
<xsl:call-template name="index">
<xsl:with-param name="idx" select="$idx - 1"/>

---------- result : ----------
<?xml version="1.0" encoding="utf-8"?>

Hope this helps.


Martin Kupisch wrote:
> Hi everyone,
> currently I am working on connecting an XML-file with an XSL-file via
> LotusXSL to get an HTML-file. So far, so good. My problem is: in the
> HTML-file there is a table that needs conditional processing. Depending on
> an specific element value, e.g. <level>4</level>, I need to get table cells,
> <TD>. I.e., the value is 4, I would like to have 4 times <TD> in the result
> tree. So, as I cannot find a way of iteration in XSL, I would like to know
> if there is any chance of getting this achieved. Thanks for any suggestions
> !!
> Martin
>  XSL-List info and archive:

Eric van der Vlist                                              Dyomedea                

 XSL-List info and archive:

Current Thread