Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Display set columns per row >Thread Next - Re: Display set columns per row Re: Display set columns per rowTo: NULL Date: 3/8/2007 6:42:00 PM
venky wrote:
> output should be like
> <tr>
> <td>Foo, foo.jpg, this is foo</td>
> <td>Foo1, foo1.jpg, this is foo1</td>
> ........
> </tr>
>
> Should display 3 columns in a row and go next one. I have done this in asp.
> But still learning xslt...
Process e.g.
<xsl:apply-templates select="hit[position() mod 3 = 0]" mode="row"/>
and
<xsl:template match="hit" mode="row">
<tr>
<xsl:apply-templates select=". |
following-sibling::hit[position() < 3]"/>
</tr>
</xsl:template>
<xsl:template match="hit">
<td><xsl:value-of select="concat(name, ', ', small-image, ', ',
short-desc)"/></td>
</xsl:template>
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
