|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Filling gaps in a list of values
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
|
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








