|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: distinct values
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
|
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








