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

📄 slashdot.xslt

📁 beereader source code
💻 XSLT
字号:
<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></head>
	<body>
		<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
	<td valign="top" bgcolor="#006666">	
	<font
	face="arial,helvetica" size="4" color="#FFFFFF">
	<b><xsl:value-of  disable-output-escaping='yes' select='//item/title'/></b></font></td>
</tr></table>
<xsl:choose>
				<xsl:when test='//item/author'>
					<b>Posted by <xsl:value-of select='//item/author'/></b>
				</xsl:when>
				<xsl:when test='//item/dc:creator'>
					<b>Posted by <xsl:value-of select='//item/dc:creator'/></b>
				</xsl:when>				
            </xsl:choose>
	<b><xsl:text>&#160;</xsl:text> on <xsl:value-of select='//item/pubDate'/></b><br />
	<xsl:if test='//item/category'><b><font size="2">from the 
   <xsl:value-of select='//item/category' /> dept.<b></b></font></b></xsl:if>
   <br />
 <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>
<p>
<b>(</b>
<a href='{//item/link}'><b>Read on...</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>	
<b>)</b>
</p>
		
</body></html>
</xsl:template>
</xsl:stylesheet>

⌨️ 快捷键说明

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