Modules | Supported Version: 1 Source<xsl:template name="set:leading">
<xsl:param name="nodes"
select="/.." />
<xsl:param name="node"
select="/.." />
<xsl:variable name="end-node"
select="$node[1]" />
<xsl:choose>
<xsl:when test="not($end-node) or not($nodes)">
<xsl:apply-templates select="$nodes"
mode="set:leading" />
</xsl:when>
<xsl:when test="count($end-node|$nodes) != count($nodes) or count($nodes[1] | $end-node) = 1" />
<xsl:otherwise>
<xsl:apply-templates select="$nodes[1]"
mode="set:leading" />
<xsl:call-template name="set:leading">
<xsl:with-param name="nodes"
select="$nodes[position() > 1]" />
<xsl:with-param name="node"
select="$end-node" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="node()|@*"
mode="set:leading">
<xsl:copy-of select="." />
</xsl:template>Change HistorySubmitted: 2001-03-28
CopyrightThis material is in the public domain. |
http://www.exslt.org/set/functions/leading/set.leading.template.xsl.html last modified 2002-11-12