[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Removing duplicates - grouping problem

Subject: Re: Removing duplicates - grouping problem
From: Bernard Harrison <b_harrison@xxxxxxxxxxxxx>
Date: Thu, 19 Oct 2000 15:08:07 +1000
bernard harrison
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.