[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How do can I select distinct nodes and adding a co

Subject: RE: How do can I select distinct nodes and adding a counter at the sa me time
From: Cams Ismael <Ismael.Cams@xxxxxxxxxxxxxxx>
Date: Fri, 22 Nov 2002 16:21:34 +0100
xslt select distinct nodes
Hello Tom,

first thanks for trying to help.
I know what you mean, but the problem I have is how do I produce a tree with
distinct values that I can access afterwards. What I do know is first
sorting, so all the same values are together. Than I check every time with
the preceding value, when this values are different I write the node to the
output. But when I now want to use the position function I have the problem
that the nodes that are double are also count. Sending the stylesheet is
difficult because it's more complicated than the examples I have sent, and I
am afraid it would make everything a little bit confusing. The only thing I
actually need is storing a copy of my tree with distinct values that I can
access afterwards. But is seems not as easy as putting it in a variable.

All ideas are welcome !

Kind regards,
Ismaël

-----Original Message-----
From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx
[mailto:TSchutzerWeissmann@xxxxxxxxxxxxxxxx]
Sent: vrijdag 22 november 2002 12:33
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  How do can I select distinct nodes and adding a
counter at the sa me time


Hi Ismaël

> What I do know is first grouping on the attributes, so I get 
> every value
> only once. Therefore I have used the sorting function. The 
> problem is I
> don't find a method to generate the id. I can't use the count function
> because some nodes of the nodeset are not used (only unique values are
> needed). Somebody an idea ?

If you're apply-templates to the distinct nodes, or running over them with a
for-each, then you should be able to use position() in either case. What
does your xslt look like?

Regards,
Tom

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

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.