Subject: Re: [xsl] Insert refs From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 17 Dec 2003 18:22:52 GMT |
This is a grouping problem, so use the usual key grouping method: first key your to elements <xsl:key mame="to" match="email/to" use="."/> Then <xsl:for-each select="email/to[generate-id(.)=generate-id(key('to',.)[1])]"> <to id="{generate-id()}"><xsl:value-of select="."/></to> </xsl:for-each> then <xsl:template match="to"> <to ref="{generate-id(key('to',.)[1])}"/> <xsl:template> untested... David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Insert refs, Ricardo Saraiva | Thread | RE: [xsl] Insert refs, Michael Kay |
[xsl] listing links in xsl?, james walker | Date | [xsl] Insert refs, Ricardo Saraiva |
Month |