xsl-list
[Top] [All Lists]

Re: Getting a distinct list of node names

2003-12-16 12:24:49
David,

At 07:53 PM 12/15/2003, you wrote:
> node:definition/*[not(name() = name(preceding-sibling::*))]

Why should this take a long time?  Isn't this the same as

*[not(name() = name(preceding-sibling::*[last()]))]

You are correct -- a bug in my code. Given a node-set argument, name() will operate on the first node in the set in document order (here, preceding-sibling::*[last()]), which therefore won't de-duplicate properly.

So it won't take a long time, and it won't work either.

The key-based approach, or Ken's, will work however.

Thanks for your vigilance, David.

Cheers,
Wendell


======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list