Subject: Re: [xsl] XPath expression to derive list of distinct element names From: Joerg Pietschmann <joerg.pietschmann@xxxxxx> Date: Thu, 10 Jan 2002 14:59:02 +0100 |
> From: David Carlisle <davidc@xxxxxxxxx> > doesn't > select="$x//*[not(following::*[name()=name(current())])]" > select all the element nodes in $x that are the last occurrence of an > element of that name? As far as i can see not, unless you redefine the current() function. Why not using the Muenchian method? <xsl:key name="sibling-names" match="*" use="concat(generate-id(..),'#',name())"/> ... select="*[generate-id()=generate-id(key(generate-id(..),'#',name())[1])]" Untested. There are some obvious optimizations. I'm not sure whether this is what the original poster wanted but HTH anyway. I also hope Jeni is absorbed with other stuff enough that i can beat her this time... :-) J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XPath expression to deriv, David Carlisle | Thread | [xsl] Turning off 'well-formedness', Richard Garcia |
Re: [xsl] Content constructors and , Joerg Pietschmann | Date | Re: [xsl] Problems to interpret an , David Carlisle |
Month |