|
Subject: RE: [xsl] Filling gaps in a list of values From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 22 Jan 2002 14:04:14 -0000 |
Hi Jeni,
I was reading your answer to the previous 'filling gaps in a list' problem
and have a question that Im hoping you can answer for me-
Does the variable $node 'pick up' a different node on each iteration of the
template? Is the variable changing on each iteration, or is something else
going on?
Thanks in advance
cheers
andrew
===
<xsl:template name="countDown">
<xsl:param name="from" select="1" />
<xsl:param name="to" select="1" />
<xsl:variable name="node" select="node[@order = $from]" />
<xsl:value-of select="concat('order ', $from, ': ')" />
<xsl:choose>
<xsl:when test="$node">
<xsl:value-of select="$node/@name" />
</xsl:when>
<xsl:otherwise>no name</xsl:otherwise>
</xsl:choose>
<xsl:text>
</xsl:text>
<xsl:if test="$from > $to">
<xsl:call-template name="countDown">
<xsl:with-param name="from" select="$from - 1" />
<xsl:with-param name="to" select="$to" />
</xsl:call-template>
</xsl:if>
</xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Filling gaps in a list of, Jeni Tennison | Thread | Re: [xsl] Filling gaps in a list of, Jeni Tennison |
| Re: [xsl] Muenchian method, and key, Jeni Tennison | Date | Re: [xsl] Filling gaps in a list of, Ben Hesketh |
| Month |