Re: [xsl] Getting a distinct list of node names

Subject: Re: [xsl] Getting a distinct list of node names
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 16 Dec 2003 14:24:49 -0500

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.


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. 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:

Current Thread