[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Testing if an attribute name is in a list of names


Subject: Re: [xsl] Testing if an attribute name is in a list of names
From: "Paul A. Hoadley" <paulh@xxxxxxxxxxxxxx>
Date: Fri, 20 May 2005 12:55:06 +0930

Hi Aron,

On Thu, May 19, 2005 at 01:28:23PM +0000, Aron Bock wrote:

> >if attribute-name is in list-of-attribute-names
> >  output attribute-value
> 
> This is what i posted does, in set-based fashion, to use a SQL term.
> What you indicated originally was more "cursor based".

Yes, I suppose you are right.  I guess I'm just fixating on the nested
for-eachs, since you're collecting the (column name) attributes from
the source tree on each iteration, aren't you?  That just feels
expensive to me.  Maybe it's not.

> >Where list-of-attribute names is generated once in advance.  Then
> >it would be just O(n) where n is the number of rows.
> 
> Sure, just pre-select them into a variable, and use that in the
> inner loop.

OK, that's more like what I was thinking of.  In fact, I tried to do
that and failed.  (I think your next post gives an implementation.)


-- 
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


Current Thread