Subject: Re: [xsl] Display unique values? From: Alan Fenn <afenn262@xxxxxxxxx> Date: Mon, 23 Jan 2006 13:39:32 -0800 (PST) |
George, Excellent! That is certainly much cleaner than my original, and it works, which is always a plus. Thanks very much! - Alan --- George Cristian Bina <george@xxxxxxxxxxxxx> wrote: > Hi Alan, > > Your stylesheet looks complicated, how about: > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output version="1.0" encoding="UTF-8" > indent="no" > omit-xml-declaration="no" > media-type="text/html"/> > > <xsl:template match="/"> > <html><table> > <thead><tr> > <td>Event</td><td>Device</td> > </tr></thead> > <tbody> > <xsl:apply-templates/> > </tbody> > </table></html> > </xsl:template> > > <xsl:template match="Event"> > <tr> > <td><xsl:value-of select="ID"/></td> > <td> > <xsl:for-each > select="EventDevicesArchive/EventDevice/Device[not(text()=../preceding-sibling::EventDevice/Device/text())]"> > <xsl:value-of select="."/> > <xsl:if test="position()!=last()"> > <xsl:text>, </xsl:text> > </xsl:if> > </xsl:for-each> > </td> > </tr> > </xsl:template> > </xsl:stylesheet> > > Hope that helps, > George > --------------------------------------------------------------------- > George Cristian Bina > <oXygen/> XML Editor, Schema Editor and XSLT > Editor/Debugger > http://www.oxygenxml.com > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Display unique values?, Alan Fenn | Thread | [xsl] <xsl:include> using relative , Chris Ward |
[xsl] help for number-rows-spanned, ying xing | Date | Re: [xsl] Display unique values?, Alan Fenn |
Month |