开发者

XSLT Pagination

开发者 https://www.devze.com 2022-12-23 17:24 出处:网络
I have created a xslt document which formats an xml document, but I would like the resultsfrom the xslt sheet to be paginated.

I have created a xslt document which formats an xml document, but I would like the results from the xslt sheet to be paginated.

here is the orginal xlst document

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">
  <xsl:for-each select="musicInformation/musicdetails">
 <label for="artistname{position()}" id="artistnameLabel{position()}">Artist Name:</label> 
 <span  id ="artistname{position()}"><xsl:value-of select="artistname" /></span> 
 <br/> 
 <label for="recordname{position()}" id="recordnameLabel{position()}">Record Name:</label> 
 <span  id ="recordname{position()}"><xsl:value-of select="recordname" /></span> 
 <br/> 
 <label for="recordtype{position()}" id="recordtypeLabel{position()}">Record Type:</label> 
 <span  id ="recordtype{position()}"><xsl:value-of select="recordtype" /></span> 
 <br/> 
 <label for="format{position()}" id="formatLabel{position()}">Format:</label> 
 <span  id ="format{position()}"><xsl:value-of select="format" /></sp开发者_运维百科an> 
 <br/> 
 <a href="xmlDetail.php?mid={@m_id}" >See Details</a>
  <br/><br/> 
  </xsl:for-each>   
  </xsl:template>
</xsl:stylesheet>


There are a lot of ways to implement pagination in XSL. One basic example is shown here.

0

精彩评论

暂无评论...
验证码 换一张
取 消