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