|
同上问题,逻辑明白,但是还是执行不了翻页,贴出规则,特此求助:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="/">
<商户列表>
<xsl:apply-templates select="//*[@id='shop-all-list']/ul/li[position()>=1 and count(.//*[@class='tit']/a/h4/text())>0 and count(.//*[@class='tit']/a/@href)>0]" mode="商户列表"/>
</商户列表>
</xsl:template>
<xsl:template match="//*[@id='shop-all-list']/ul/li[position()>=1 and count(.//*[@class='tit']/a/h4/text())>0 and count(.//*[@class='tit']/a/@href)>0]" mode="商户列表">
<item>
<商户名>
<xsl:value-of select="*//*[@class='tit']/a/h4/text()"/>
<xsl:value-of select="*[@class='tit']/a/h4/text()"/>
<xsl:if test="@class='tit'">
<xsl:value-of select="a/h4/text()"/>
</xsl:if>
</商户名>
<二级详情>
<xsl:value-of select="*//*[@class='tit']/a/@href"/>
<xsl:value-of select="*[@class='tit']/a/@href"/>
<xsl:if test="@class='tit'">
<xsl:value-of select="a/@href"/>
</xsl:if>
</二级详情>
</item>
</xsl:template>
</xsl:stylesheet> |
|
共 10 个关于本帖的回复 最后回复于 2016-12-28 12:47