我想在ReplyID等于5的时候,让他分页显示,谁能帮帮我啊,实在是搞不定了.xml文件<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="changeXML.xsl" ?>
<Root>
<Topic>
<Title>rr</Title>
<SendTime>2005-7-15 10:08:24</SendTime>
<Content>rr</Content>
<Username>rr</Username>
</Topic>
<Replys>
<Reply>
<ReplyID>1</ReplyID>
<ReplyContent>yyyyyyyyyy</ReplyContent>
<ReplyTime>2005-7-15 10:08:52</ReplyTime>
</Reply>
<Reply>
<ReplyID>2</ReplyID>
<ReplyContent>yyyyyyyyyy</ReplyContent>
<ReplyTime>2005-7-15 10:08:52</ReplyTime>
</Reply>
<Reply>
<ReplyID>3</ReplyID>
<ReplyContent>444444</ReplyContent>
<ReplyTime>2005-7-15 10:09:12</ReplyTime>
</Reply>
</Replys>
</Root>
xsl文件
<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates select="Root" /><!-- 匹配根 -->
</xsl:template>
<xsl:template match="Root">
<xsl:apply-templates select="Topic" /><!-- 匹配主题部分 -->
<xsl:apply-templates select="Replys" /><!-- 匹配回复部分 -->
</xsl:template>
<xsl:template match="Topic"><!-- 匹配内容发布 -->
<table width="100%" border="0">
<tr>
<td>
<b><font color="red"><xsl:value-of select="Title" /></font></b><br/><br/>
</td>
</tr>
<tr>
<td><b><font size="2">发布内容:</font></b><br/>
<font size="2"><xsl:value-of select="Content" /></font><br/><br/>
</td>
</tr>
<tr>
<td>
<b><font size="2">发布时间:</font></b><font size="2"><xsl:value-of select="SendTime"/></font><br />
<b><font size="2">发布人:</font></b><font size="2"><xsl:value-of select="Username"/></font>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="Replys">
<xsl:apply-templates select="Reply" />
</xsl:template>
<xsl:template match="Reply"><!-- 匹配回复内容 -->
<table width="100%" border="0" >
<tr>
<td><b><font size="2">回复内容:</font></b><br/>
<font size="2"><xsl:value-of select="ReplyContent" /></font><br/><br/>
</td>
</tr>
<tr>
<td>
<b><font size="2">回复时间:</font></b><font size="2"><xsl:value-of select="ReplyTime"/></font><br />
<b><font size="2">回复人:</font></b><font size="2"><xsl:value-of select="Username"/></font>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
<?xml-stylesheet type="text/xsl" href="changeXML.xsl" ?>
<Root>
<Topic>
<Title>rr</Title>
<SendTime>2005-7-15 10:08:24</SendTime>
<Content>rr</Content>
<Username>rr</Username>
</Topic>
<Replys>
<Reply>
<ReplyID>1</ReplyID>
<ReplyContent>yyyyyyyyyy</ReplyContent>
<ReplyTime>2005-7-15 10:08:52</ReplyTime>
</Reply>
<Reply>
<ReplyID>2</ReplyID>
<ReplyContent>yyyyyyyyyy</ReplyContent>
<ReplyTime>2005-7-15 10:08:52</ReplyTime>
</Reply>
<Reply>
<ReplyID>3</ReplyID>
<ReplyContent>444444</ReplyContent>
<ReplyTime>2005-7-15 10:09:12</ReplyTime>
</Reply>
</Replys>
</Root>
xsl文件
<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates select="Root" /><!-- 匹配根 -->
</xsl:template>
<xsl:template match="Root">
<xsl:apply-templates select="Topic" /><!-- 匹配主题部分 -->
<xsl:apply-templates select="Replys" /><!-- 匹配回复部分 -->
</xsl:template>
<xsl:template match="Topic"><!-- 匹配内容发布 -->
<table width="100%" border="0">
<tr>
<td>
<b><font color="red"><xsl:value-of select="Title" /></font></b><br/><br/>
</td>
</tr>
<tr>
<td><b><font size="2">发布内容:</font></b><br/>
<font size="2"><xsl:value-of select="Content" /></font><br/><br/>
</td>
</tr>
<tr>
<td>
<b><font size="2">发布时间:</font></b><font size="2"><xsl:value-of select="SendTime"/></font><br />
<b><font size="2">发布人:</font></b><font size="2"><xsl:value-of select="Username"/></font>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="Replys">
<xsl:apply-templates select="Reply" />
</xsl:template>
<xsl:template match="Reply"><!-- 匹配回复内容 -->
<table width="100%" border="0" >
<tr>
<td><b><font size="2">回复内容:</font></b><br/>
<font size="2"><xsl:value-of select="ReplyContent" /></font><br/><br/>
</td>
</tr>
<tr>
<td>
<b><font size="2">回复时间:</font></b><font size="2"><xsl:value-of select="ReplyTime"/></font><br />
<b><font size="2">回复人:</font></b><font size="2"><xsl:value-of select="Username"/></font>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货