Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Help? - xsl if statement >Thread Next - Re: Help? - xsl if statement Re: Help? - xsl if statementTo: NULL Date: 4/13/2008 6:55:00 PM
I'm trying to iterate through a collection and list them in a table going
horizontally, not vertically.
Example of what i've currently got, but not working:
<xsl:variable name="columns" select="5"/>
<table>
<xsl:for-each select="//People">
<xsl:if test="(position() mod $columns) = 0"><tr></xsl:if>
<td>
<xsl:value-of select="@name"/>
</td>
<xsl:if test="(position() mod $columns) = 0"></tr></xsl:if>
</xsl:for-each>
</table>
Does that make sense?
"Anthony Jones" <Ant@y...> wrote in message
news:uJQEcsTnIHA.4372@T......
>
> "Julie Smith" <julie@h...> wrote in message
> news:%23DxAu7RnIHA.3940@T......
>> Hi,
>> I want to do this:
>> <xsl:if test="true"></tr></xsl:if>
>>
>> However, I keep getting an error about the </tr>. How can i do this?
>>
>
>
> Since XSL is XML it needs to be well formed. You can't therefore end an
> element conditionally in the way above. Can you provide more detail of
> the
> problem you want to solve?
>
>
> --
> Anthony Jones - MVP ASP/ASP.NET
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
