via keys,xsl key uniq,via key, xml%%%via keys - Re: sort

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

Re: sort | uniq via keys

Subject: Re: sort | uniq via keys
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Fri, 15 Feb 2002 09:45:49 +0100
via keys
Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote:
> [Saverio wrote:]
> >I'd like to extract
> >the names of elements residing at the same `level' in the input tree,
> 
> There are (at least) two ways to approach this. One would be to declare
> different keys for different levels, such as
>   <xsl:key name="features1" match="/*/*" use="name()"/>

The following key generalizes this:
    <xsl:key name="features-level" match="*"
         use="concat(count(ancestor::*)),'#',name())"/>
Us this for example as follows
   <xsl:for-each select="/descendant::*[count(.|key('features-level',concat(count(ancestor::*)),'#',name())))=1]">
    
BTW: May i remind all posters (in particular those who recently
started to post) to trim unnecessary quotes? Those are really
messing up the digest.

Regards
J.Pietschmann

 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.