[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:key and parameters?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|