xsl-list
[Top] [All Lists]

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

2005-05-19 20:25:06
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--