xsl:key and parameters?

Subject: xsl:key and parameters?
From: Raj Muchhala <rmuchhala@xxxxxxxxxxxxxx>
Date: Mon, 18 Sep 2000 09:35:43 -0500
Hi all,

Hoping someone can shed some light on this.  I decided to rewrite some of my
xsl to make use of the 'xsl:key' element and am finding that invoking it
with a parameter does not work.  What am I doing wrong??  [Code below will
make things more clear]

PS - I am using MSXML30, IE5.5 & msofts parser

TIA,

Raj
rmuchhala@xxxxxxxxxxxxxx

---------------- Start Code ------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0"
	xmlns:msxsl='urn:schemas-microsoft-com:xslt'
	xmlns:rs='urn:schemas-microsoft-com:rowset'
	xmlns:z='#RowsetSchema'
	xmlns:test='urn:mytest'>
<xsl:key name="by_job" match="/xml/rs:data/z:row" use="@job_number" />
<xsl:param name="job" select="'14036'"/>
<xsl:template match="/">

****** Ilrelevant stuff snipped ************************

<xsl:template match="rs:data">
<xsl:for-each select="key('by_job', $job)">
						^^^^ <--- does not work
<!-- <xsl:for-each select="key('by_job', '56983')"> -->
                                         ^^^^^^^ <--- works fine
<!-- <xsl:for-each select="xml/rs:data/z:row[@job_number[.=$job]]"> -->
                                                           ^^^^ <--- works
fine				    	
<tr>
	<td colspan="16"><xsl:value-of select="@job_number"/></td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

------------------------------ End Code
----------------------------------------------


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread