xsl-list
[Top] [All Lists]

Re: grouping by unique...

2003-06-17 14:06:52
Fei Zheng wrote:

I'd like to have an unique solution list.  Anyone can tell what's
> wrong with the following code which gives all solutions instead of
> the unique solutions?
              select="item[not(metadata/solution = 
preceding-sibling::metadata/solution)]/metadata/solution"  />

You are using the preceding-sibling on the wrong element.
Try
  select="item/metadata/solution[not(. = preceding-sibling::solution)]"/>

J.Pietschmann



XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>