|
Subject: Re: [xsl] Displaying 10 Records at a time From: Mukul Gandhi <mukulgw3@xxxxxxxxx> Date: Mon, 3 Nov 2003 07:28:36 -0800 (PST) |
Hi Karthikeyan,
I guess, using the mathematical *mod operator* , to
calculate, the 10th, 20th .. rows, shall solve the
problem ,
The XSL fragment is --
<xsl:for-each select="TABLE/TBODY/ROW">
<tr>
<td>
<xsl:value-of select="ENTRY[1]/PARA[1]"/>
</td>
<td>
<xsl:value-of select="ENTRY[2]/PARA[2]"/>
</td>
</tr>
<xsl:if test="position() mod 10 = 0">
<tr>
<td>=============================
</td>
<td>============================
</td>
</tr>
</xsl:if>
</xsl:for-each>
Regards,
Mukul
--- "karthikeyan.balasubramanian"
<karthikeyan.balasubramanian@xxxxxxxxxxxxx> wrote:
> Hi,
>
> I am not sure if I have put correct subject.
>
> I want to display 10 records in a table
> after this I want to show horizontal line and
> display another 10 and this sequence
> continues. How do I keep track of this
> information?
>
>
> Output
> =====
>
> heading : data1
> data1, data2, data3, data4, data5
> data6, data7, data8, data9, data10
>
> ============================
> heading: data11
> data11, data12, data13, data14, data15
> data16, data17, data18, data19, data20
> ============================
>
> heres my xsl
> ============
>
> <xsl:template match="NI">
> <h1>heading : ?</h1>
> <table>
> <tr>
> <td>sub-title1</td>
> <td>sub-title2</td>
> </tr>
> <xsl:for-each select="TABLE/TBODY/ROW">
> <tr>
> <td>
> <xsl:value-of select="ENTRY[1]/PARA[1]"/>
> </td>
> <td>
> <xsl:value-of select="ENTRY[2]/PARA[2]"/>
> </td>
> </tr>
> </xsl:for-each>
> </table>
> </xsl:template>
>
> sample xml
> ===========
>
> <NI PUBLISH="DEC31">
> <TABLE>
> <TBODY>
> <ROW>
> <ENTRY>
> <PARA>MS9557-09</PARA>
> <PARA LEVEL="2">73 34 15 01 010</PARA>
> </ENTRY>
> <ENTRY>
> <PARA/>
> <PARA>3</PARA>
> </ENTRY>
> </ROW>
> <ROW>
> <ENTRY>
> <PARA>MS9557-09</PARA>
> <PARA LEVEL="2">73 34 15 01 010</PARA>
> </ENTRY>
> <ENTRY>
> <PARA/>
> <PARA>3</PARA>
> </ENTRY>
> </ROW>
> </TBODY>
> </TABLE>
> </NI>
>
> Have a great day.
>
> Karthikeyan B
>
>
>
> XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
>
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Displaying 10 Records at , Jarkko . Moilanen | Thread | [xsl] cmdline XPath utility, Richard Lewis |
| [xsl] Different parsers, different , Richard Lewis | Date | Re: [xsl] getting crlf's, but putti, Ray Tayek |
| Month |