⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xhtml.body.xslt

📁 beereader source code
💻 XSLT
字号:
<?xml version="1.0" encoding="GB2312" ?>
<xsl:stylesheet version='1.0' 
		xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
		xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
		xmlns:xhtml='http://www.w3.org/1999/xhtml'
		xmlns:slash='http://purl.org/rss/1.0/modules/slash/'
	  xmlns:dc='http://purl.org/dc/elements/1.1/'   >
	  
		<xsl:output method='xml' indent='yes' /> 

		<xsl:template match='/'>
		<html><head><title><xsl:value-of select='//item/title'/></title>
		<style><![CDATA[
			body		{ font-family:Verdana;Arial; font-size:11pt; margin:0pt; padding:0pt; }
			table { 
			  font-family:Verdana;Arial;
			  color:white;
			  cell-padding:2pt;
			  background:#336699;
			  width:100%;height:30px;
			  border-top:1px solid #99CCFF;border-bottom:1px solid #000000; 
			}
			.title		{ font-size:14pt;}
			.date		{ font-size:9pt; }
			div.content { font-family:Verdana,Arial;font-size:11pt;margin:10pt;padding:5pt;  }
			td.title a:link      { color:#6699CC;text-decoration:none;font-weight:bold; }
			td.title a:visited   { color:#6699CC;text-decoration:none; }
			td.title a:hover		 { color:#99CCFF;text-decoration:none;font-weight:bold; }
			a:link      { color:#336699;text-decoration:none;font-weight:bold; }
			a:visited   { color:#336699;text-decoration:none; }
			a:hover		{ color:#99CCFF;text-decoration:none;font-weight:bold; }
		]]></style>
		</head><body>
		<table>
		<tr>
	  	  <td class='title' width='75%'><xsl:value-of disable-output-escaping='yes' select='//item/title'/></td>
		  <td class='date' width='25%' valign='bottom' align='right'><b><xsl:value-of select='//item/category'/></b><br/><xsl:value-of select='//item/pubDate'/></td>
		 </tr>
		</table>
		<div class='content'>
			<xsl:choose>
				<xsl:when test='//item/xhtml:body'>
					<xsl:copy-of select='//item/xhtml:body'/>
				</xsl:when>
				<xsl:when test='//item/content:encoded'>
					<xsl:value-of  disable-output-escaping='yes' select='//item/content:encoded'/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of disable-output-escaping='yes' select='//item/description'/>
				</xsl:otherwise>
            </xsl:choose>
			<br/><br/>
			<a href='{//item/link}'><b>马上阅读...</b></a>
			<xsl:if test='//item/comments'>
				<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
				<xsl:text disable-output-escaping='yes'>&lt;a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='//item/comments'/><xsl:text disable-output-escaping='yes'>'&gt;</xsl:text>
						<b><xsl:value-of select='//item/slash:comments'/> Comments...</b>
					<xsl:text disable-output-escaping='yes'>&lt;/a></xsl:text>				
			</xsl:if>			
		</div>
		</body></html>
		</xsl:template>

		</xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -