📄 home.xsl
字号:
<?xml version="1.0" encoding="UTF-8"?>
<?jpluck name="Common Dreams home"
description="Reformats the Common Dreams front page. Extracts headlines and views."
uri-pattern="http://.*commondreams.org/"
?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="jpluck.xsl"/>
<xsl:template match="/">
<html>
<head>
<title>Common Dreams</title>
</head>
<body>
<h1>Common Dreams</h1>
<xsl:apply-templates select="/html/body/table[1]"/>
<h2>Headlines</h2>
<xsl:apply-templates select="/html/body/div/table[1]/tr/td/center/table/tr/td/table" mode="headlines"/>
<h2>Articles</h2>
<xsl:copy-of select="/html/body/div/table[1]/tr/td[3]/p[1]"/>
</body>
</html>
</xsl:template>
<xsl:template match="table" mode="headlines">
<ul>
<xsl:for-each select="tr">
<xsl:if test="position()>1 and position()<last()">
<li>
<xsl:apply-templates select="td[2]/*"/>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -