|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath expression to derive list of distinct elemen
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








