[Home] [By Thread] [By Date] [Recent Entries]
This isn't working for me. I get 0 results even when I ask for the first
one:
<xsl:key name="p" match="project_staff_role" use="@staff_id"/> <xsl:variable name="common" select="$staff_roles[generate-id()=generate-id(key('p',@staff_id)[0])]"/> I tried playing around with what is going into the generate-id and key functions, but that didn't help. I'm not sure what's really going on in the above statement. If I don't look at it too carefully I can intuit what's going on, but when I look at it closely it doesn't quite make sense. generate-id(key('p',@staff_id)[0])] is the most confusing part. Why the @staff_id in the key but not in the generate_id()? I thought that generate_id produced unique values for each element (in this case staff_id) wouldn't the [0] element just give you the first staff_id? When I think about this I wonder if the [0] goes somewhere else. I appreciate your time. Joelle David Carlisle wrote: Now I want to find all of the people in <project_staff_roles> who are listed more than, arbitrarily, 5 times.
|

Cart



