Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - missing something in for-each select >Thread Next - Re: missing something in for-each select Re: missing something in for-each selectTo: NULL Date: 9/11/2009 12:40:00 PM Junkbox wrote:
> The xml is basically
> <result status="ok">
> <product>
> <nodes...>
> </product>
> <product>
> <nodes...>
> </product>
> <...>
> </result>
>
> I'm trying to lay out the product data in a 3x3 grid format with...
>
> <xsl:template match="result[@status='ok']">
> <xsl:apply-templates/>
> </xsl:template>
>
> <xsl:template match="product">
> <xsl:for-each select=".[position() mod 3 =1]">
That for-each does not make sense to me as the dot "." selects only a
single node. Maybe you simply want
<xsl:if test="position() mod 3 = 1">
instead of the for-each.
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
