[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Display records in 3 columns

Subject: Display records in 3 columns
From: "Peter Lukan" <peter.lukan@xxxxxxxx>
Date: Thu, 1 Apr 2004 12:04:18 +0200
xsl columns
Hello!

I'm having trouble with displaying data in 3 columns.

I've managed to create a table with 3 columns :

******* XSL code ***********

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:output method="html"/>

<xsl:template match="/">
 <table width="400">
 <xsl:call-template name="coloredRow">
  <xsl:with-param name="count" select="1"/>
 </xsl:call-template>
 </table>
</xsl:template>


<xsl:template name="coloredRow">
<xsl:param name="count"/>

<xsl:if test="$count != count(data/objekt)">

  <xsl:if test="1=($count mod 3)">#<#tr#>#</xsl:if>

  <td bgcolor="#ccff66">
    vsebina: <xsl:value-of select="data/objekt/filename"/>
   </td>

  <xsl:if test="0=($count mod 3)">#<#/tr#>#</xsl:if>
     <xsl:call-template name="coloredRow">
        <xsl:with-param name="count" select="$count + 1"/>
     </xsl:call-template>

</xsl:if>
</xsl:template>

</xsl:stylesheet>

************* end of XSL code **************

but I can't display different records in this code <xsl:value-of
select="data/objekt/filename"/>
I think I should use position() function but don't know how!

Thanx Peter Lukan

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.