XSL page output

Discussion in 'XML' started by thomas, May 14, 2005.

  1. thomas

    thomas Guest

    I was wandering if theres a way to make a .xsl page output 20 results per
    page. My page transforms an .xml file but as its a large file, it outputs
    hundreds of results on the same page.

    heres my .xsl page

    <?xml version="1.0"?>

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

    <xsl:param name="text1" />

    <xsl:template match="/">

    <html>

    <head>
    <link rel="stylesheet" type="text/css" href="mystyle.css" />
    <title>Results</title>
    </head>

    <body>

    <table class="three" align="center">

    <col width="35%"/>
    <col width="35%"/>
    <col width="15%"/>
    <col width="15%"/>

    <tr>
    <th class="head">Artist</th>
    <th class="head">Song</th>
    <th class="head">Chord</th>
    <th class="head">Midi</th>
    </tr>

    <xsl:for-each select="cat/links[contains(artist, $text1) or contains(song,
    $text1)]">
    <xsl:sort select="artist"/>

    <tr>
    <td><xsl:apply-templates select="./artist"/></td>
    <td><xsl:apply-templates select="./song"/></td>
    <xsl:variable name="link1"><xsl:apply-templates
    select="./chord"/></xsl:variable>
    <td><a href="media/{$link1}.txt" target="_blank">view</a></td>
    <xsl:variable name="link2"><xsl:apply-templates
    select="./midi"/></xsl:variable>
    <td><a href="media/{$link2}.mid">play</a></td>
    </tr>

    </xsl:for-each>

    </table>

    <div align="center">
    <a href="javascript:history.go(-1)">Click here to return to search page</a>
    </div>

    </body>

    </html>

    </xsl:template>
    thomas, May 14, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Waqas Ashraf
    Replies:
    2
    Views:
    515
    Alexander Schatten
    Oct 5, 2003
  2. Ray Tayek
    Replies:
    3
    Views:
    502
    Ray Tayek
    Nov 30, 2003
  3. Replies:
    1
    Views:
    3,588
    A. Bolmarcich
    May 27, 2005
  4. Replies:
    0
    Views:
    542
  5. Replies:
    0
    Views:
    520
Loading...

Share This Page