Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Help? - xsl if statement

From: "Julie Smith" <julie@----.--->
To: 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
>
> 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent