Subject: Re: [xsl] Fwd: xsl:key() and $variables. From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 24 Jul 2006 11:34:34 -0400 |
I've never heard of xsl:key but the second illustration here:
http://www.cranesoftwrights.com/resources/xslkeys/index.htm
looks useful. It seems an xsl:key is like a variable containing a list of elements that match the xpath expression. But the key() function allows you to filter on that list further by providing a key (overloaded term warning). So in the above illustration the xsl:key statement builds a list of Employee elements and indicates that the SSN child should be used when a key is supplied to the key() function. So the key('people',@emp) call says, "fetch all elements in the 'people' list using the SSN @emp.
Presumably each Employee would have a unique SSN and therefore the key() call will return one Element.
Cheers, Wendell
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Fwd: xsl:key() and $varia, Michael B Allen | Thread | Re: [xsl] Fwd: xsl:key() and $varia, M. David Peterson |
RE: Re: [xsl] listing elements & su, cknell | Date | Re: [xsl] building a hierarchical c, Mukul Gandhi |
Month |