Re: [xsl] Creating unique groups

Subject: Re: [xsl] Creating unique groups
From: Marian Olteanu <mou_softwin@xxxxxxxxx>
Date: Fri, 3 Dec 2004 23:20:06 -0800 (PST)
I think a code like the following would help. I assume that entries are unique per each group.
 
<xsl:template match="/">
 <root>
 <xsl:for-each select="/root/group">
  <xsl:if test="not( following-sibling::group[ current()/@name = @name ] )">
   <group name="{@name}">
    <xsl:copy-of select="/root/group[ current()/@name = @name ]/entry"/>
   </group>
  </xsl:if>
 </xsl:for-each>
 </root>
</xsl:template>


-------------------------
Marian
http://www.utdallas.edu/~mgo031000/


		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

Current Thread