Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: missing something in for-each select [Thread Next] Re: missing something in for-each selectTo: NULL Date: 9/11/2009 8:01:00 PM I think the if is right Martin, the more I think about it. Thanks for helping me see the trees =) "Martin Honnen" <mahotrash@y...> wrote in message news:ePd%233wsMKHA.504@T...... > 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 | |||
|
