Re: [xsl] Wildcard problem

Subject: Re: [xsl] Wildcard problem
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Thu, 6 Oct 2005 20:29:58 +0200
Hi Houman,

> Both versions work perfectly fine now.  You are amazing dude. :o)

Thanks! But I think that, on any day, if you should choose between a
solution from me, or one from a number of other people on this list,
you should not choose my solution. I still have a lot to learn.

> I read a bit more about key() and generate-id() to understand the
> Muechian grouping a bit more.  However I don't understand the [1] in the
> generate-id(). What does it do?

Well, the very short answer is [1] ~ [position()=1] which I think you
knew already :-)

What we are doing, is iterating over every element and checking to see
whether that element is the first in the list. We generate an id of
the current node. This is then compared to the first element in the
key that we get, which satisfy the use-condition that we send. Only if
they are the same are they added to the list of elements that we are

I hope that this helps and does not confuse you instead :-)

Ragulf Pickaxe :-)

Current Thread