Re: Removing duplicates - grouping problem

Subject: Re: Removing duplicates - grouping problem
From: Bernard Harrison <b_harrison@xxxxxxxxxxxxx>
Date: Thu, 19 Oct 2000 14:52:47 +1000
The following style sheet seemed to work using MSXML3.0.
Though I am not sure exactly what result
result you are expecting. I was guided by
the source sample and style sheet you supplied

I did have trouble using the "preceding-sibling" axis.
"preceding" does the job in this case but I would
have thought preceding-sibling should also work
in this context?

Bernard


<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format";>

<xsl:template match="UMLSCollection">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>

<xsl:template match="concept">
Concept Name:
<xsl:value-of select="cn"/><br/>
<xsl:apply-templates select="term"/>
</xsl:template>

<xsl:template match="term">
<xsl:text> Synonym: </xsl:text>
<xsl:value-of select="tn"/><br/>
Source: <br/>
<xsl:for-each select="termVariant/strSource/sab">
<xsl:sort select="."/>
<xsl:choose>
<xsl:when test = "position() > 1 and not(. = ./preceding::node())">
<xsl:value-of select="."/><BR/>
</xsl:when>
<xsl:when test = "position() = 1">
<xsl:value-of select="."/><br/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread