【问题标题】:XSLT PaginationXSLT 分页
【发布时间】:2010-03-23 23:34:58
【问题描述】:

我创建了一个格式化 xml 文档的 xslt 文档,但我希望对 xslt 工作表的结果进行分页。

这是原始的 xlst 文档

<?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" /></span> 
 <br/> 
 <a href="xmlDetail.php?mid={@m_id}" >See Details</a>
  <br/><br/> 
  </xsl:for-each>   
  </xsl:template>
</xsl:stylesheet>

【问题讨论】:

    标签: xslt pagination


    【解决方案1】:

    有很多方法可以在 XSL 中实现分页。 here 显示了一个基本示例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-06-10
      • 2019-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多