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

Re: Selecting multi-existant elements only once

Subject: Re: Selecting multi-existant elements only once
From: Sorin Marti <mas@xxxxxxxxxx>
Date: Thu, 28 Nov 2002 15:27:37 +0100
sorin marti
TSchutzerWeissmann@xxxxxxxxxxxxxxxx wrote:

Or you could use xsl:key, which is quicker and very useful.

Thanks, I changed my code.
mas

-----Original Message-----
From: Sorin Marti [mailto:mas@xxxxxxxxxx]
Sent: 25 November 2002 15:30
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Selecting multi-existant elements only once


I've got the solution...sorry for asking...


<xsl:for-each select="//departement/profession[not(desc=preceding::desc)]">
<xsl:value-of select="desc"/>
</xsl:for-each>


Sorin Marti

I wrote:

Hi all,

I've got a XML-File with following structure. There are different departements and in each departement there are different

professions.

I want to have every profession of all departement once...

If there is

a Manager in departement a and departement b, "Manager"

should only be

printed out once...

How can I do that?

[...]
<departement>
<profession>
  <desc>Manager</desc>
  <salary>5000</salary>
</profession>

<profession>
  <desc>Assistant</desc>
  <salary>3000</salary>
</profession>

<profession>
  <desc>Employee</desc>
  <salary>2000</salary>
</profession>
</departement>

<departement>
<profession>
  <desc>Manager</desc>
  <salary>5000</salary>
</profession>

<profession>
  <desc>Worker</desc>
  <salary>2000</salary>
</profession>
</departement>

[...]

Thanks for your help !

Sorin


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






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


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.