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

Re: Sub: returning unique node in am xml

Subject: Re: Sub: returning unique node in am xml
From: "Agnes Kielen" <a.kielen@xxxxxxx>
Date: Thu, 13 Feb 2003 15:34:24 +0100
xml select unique nodes
Hi,

>   <root>
>      <customers>
>   <orderid/>
>           <orderdate/>
>      </customers>
>     <customers>
>          <orderid/>
>          <orderdate/>
>     </customers>
>     <orders>
>           <orderId/>
>           <orderdate/>
>     </orders>
> </root>
>
> i want to get only the unique child nodes of root .. ie .. i want only
> customer,orders and
> not customers , customers, orders .
>  how do i do that ?

The usual way of selecting an unique node is something like:

<xsl:for-each select="customers[not(preceding::customers)]>

> when i am accessing the first customer node ... i should know that i am
> processing the first
> customer node ..
> if i am accessing the second customer node is there anyway of knowing that
i
> am accessing
> the second customers node.

maybe the function position() can help you.

Hope this helps. Otherwise search the archives for unique nodes. There are
plenty of examples.

Cheers,
Agnes





 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.