1<?xml version="1.0"?> 2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3<xsl:output method="html" indent="yes"/> 4 5<xsl:template match="rss/channel"> 6<xsl:variable name="link" select="link"/> 7 <xsl:variable name="description" select="description"/> 8 <xsl:variable name="image" select="image/url"/> 9 <xsl:variable name="idesc" select="image/description"/>10 <xsl:variable name="ilink" select="image/link"/>11 <xsl:variable name="iwide" select="image/width"/>12 <xsl:variable name="ihigh" select="image/height"/>13<div class="head">14 <xsl:if test="$image">15 <a href="{$ilink}" title="{$idesc}"><xsl:value-of select="ilink" /></a>16 <img src="{$image}" height="{$ihigh}" width="{$iwide}" style="float: left; margin: 2px; border: 0px;"/>17 </xsl:if> 18 <font size="4"><a href="{$link}"><xsl:value-of select="title" disable-output-escaping="yes"/></a><br/>19<xsl:value-of select="description" disable-output-escaping="yes"/><br/> 20 <xsl:value-of select="webMaster" disable-output-escaping="yes"/><br/>21 <xsl:value-of select="copyright" disable-output-escaping="yes"/></font>22 <hr/>23</div>24 <xsl:apply-templates select="item"/>25</xsl:template>2627<xsl:template match="item">28 <xsl:variable name="item_link" select="link"/>29 <xsl:variable name="item_title" select="description"/>30 <div class="subHead" style="width:740px;">31 <a href="{$item_link}"><xsl:value-of select="title" disable-output-escaping="yes"/></a></div>32 <div style="width:740px;">33 <xsl:value-of select="description" disable-output-escaping="yes"/><br/></div>3435<hr/>36 </xsl:template>3738</xsl:stylesheet> 相关文章: