|
Subject: Re: distinct values From: "Jon Smirl" <jonsmirl@xxxxxxxxxxxx> Date: Tue, 8 Jun 1999 13:01:42 -0400 |
In the Microsoft implementation the variable could be eliminated with:
From: David Carlisle <davidc@xxxxxxxxx>...
<xsl:template match="*">
<xsl:if
test="not(from-preceding-siblings(*[qname(.)=context().qname(.)]))">
[[<xsl:value-of select="qname(.)"/>]]
</xsl:if>
</xsl:template>
which leads me to:
<xsl:template match="root">
<xsl:choose>
<xsl:when test="../*[(index() $lt$ context()!index()) $and$
(nodeName() = context()!nodeName())][0]">
</xsl:when>
<xsl:otherwise>
<xsl:node-name/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Which works!
My mistake was in try to approach the problem from a sorting perspective. It
is much easier just to test for membership in the set of previous nodes.
Jon Smirl
jonsmirl@xxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: distinct values, David Carlisle | Thread | XSL Includes, Hari Yerram |
| Re: distinct values, David Carlisle | Date | XSL Includes, Hari Yerram |
| Month |