Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Passing distinct values as parameters >Thread Next - Re: Passing distinct values as parameters Re: Passing distinct values as parametersTo: NULL Date: 11/18/2007 2:27:00 PM
davidcl64@g... wrote:
> <xsl:template match="/">
> <b>Overall</b>
> <table border="1">
> <tr bgcolor="#00eeff" color="white">
> <td><b>Location</b></td>
> <td><b>Current</b></td>
> <td><b>Pending</b></td>
> <td><b>Replacement</b></td>
> <td><b>New</b></td>
> <td><b>Total</b></td>
> </tr>
>
>
> <!-- this doesn't work - totals end up as 0 -->
> <xsl:for-each select="//LOCATION[generate-id()=generate-
> id(key('distinct-segcode',.))]">
> <xsl:call-template name="writeCount">
Here, when the template is called, the context node is a LOCATION element.
> <xsl:with-param name="location"><xsl:value-of select="."/
>> </xsl:with-param>
> </xsl:call-template>
> </xsl:for-each>
>
>
> <!-- Calling directly with names works - totals end up as
> expected -->
> <xsl:call-template name="writeCount">
> <xsl:with-param name="location">Florida</xsl:with-param>
Here, when the template is called, the context node is the root node /.
> </xsl:call-template>
> <xsl:call-template name="writeCount">
Same here.
> <xsl:with-param name="location">Washington</xsl:with-
> param>
> </xsl:call-template>
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
