Subject: Re: [xsl] Set of distinct values From: Xiaocun Xu <xiaocunxu@xxxxxxxxx> Date: Thu, 31 May 2001 12:24:25 -0700 (PDT) |
Hi, Jason: You can achieve what you needed using preceding axis like the following: <distinct> <xsl:for-each select="root/node[not(.=preceding::node)]"> <node><xsl:value-of select="."/></node> </xsl:for-each> </distinct> Xiaocun --- Jason Macki <jmacki@xxxxxxx> wrote: > Hello, > > I was wondering anyone can suggest a way that XSL > can select a set of > distinct values from an XML document, similar to a > "Select DISTINCT" > command in SQL. > > For example, I'd like to transform this: > > <root> > <node>a</node> > <node>b</node> > <node>c</node> > <node>a</node> > <node>b</node> > <node>c</node> > <node>a</node> > <node>b</node> > <node>c</node> > <node>a</node> > <node>b</node> > <node>c</node> > <node>d</node> > </root> > > Into this => > > <distinct> > <node>a</node> > <node>b</node> > <node>c</node> > <node>d</node> > </distinct> > > Thanks, > Jason > > XSL-List info and archive: > http://www.mulberrytech.com/xsl/xsl-list > __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Set of distinct values, Jason Macki | Thread | [xsl] conditional match, Kevin_Gutch |
RE: [xsl] XSL and Namespace, Mark Nahabedian | Date | [xsl] conditional match, Kevin_Gutch |
Month |