Subject: Re: [xsl] sort | uniq via keys From: Joerg Pietschmann <joerg.pietschmann@xxxxxx> Date: Fri, 15 Feb 2002 09:45:49 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] sort | uniq via keys, Saverio Perugini | Thread | [xsl] trouble merging an XHTML and , Bruce Kimpel |
Re: [xsl] trouble re-rendering XHTM, Jeni Tennison | Date | Re: [xsl] xsl:include with plain te, Jeni Tennison |
Month |