You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jo...@apache.org on 2003/08/16 17:17:10 UTC
cvs commit: cocoon-2.1/src/blocks/html/samples samples.xml sitemap.xmap
joerg 2003/08/16 08:17:10
Modified: src/blocks/html/samples samples.xml sitemap.xmap
Added: src/blocks/html/samples/stylesheets googlenews.xsl
Log:
first try with google news (unstyled list of news)
Revision Changes Path
1.1 cocoon-2.1/src/blocks/html/samples/stylesheets/googlenews.xsl
Index: googlenews.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:template match="/xhtml:html">
<html>
<head>
<title><xsl:value-of select="xhtml:head/xhtml:title"/></title>
</head>
<body>
<h2><xsl:value-of select="xhtml:head/xhtml:title"/></h2>
<ul>
<xsl:apply-templates select="xhtml:body/xhtml:table[position() > 3]"/>
</ul>
</body>
</html>
</xsl:template>
<xsl:template match="xhtml:table">
<li>
<xsl:apply-templates select="xhtml:tr/xhtml:td[last()]"/>
</li>
</xsl:template>
<xsl:template match="xhtml:td">
<xsl:apply-templates select="xhtml:a"/>
<br/>
<xsl:apply-templates select="xhtml:font/text()[normalize-space()][1]"/>
</xsl:template>
<xsl:template match="xhtml:a">
<a href="http://news.google.com{@href}" title="{@title}">
<xsl:value-of select="text()"/>
</a>
</xsl:template>
</xsl:stylesheet>
1.2 +3 -3 cocoon-2.1/src/blocks/html/samples/samples.xml
Index: samples.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/html/samples/samples.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- samples.xml 11 Jun 2003 00:00:45 -0000 1.1
+++ samples.xml 16 Aug 2003 15:17:10 -0000 1.2
@@ -9,8 +9,8 @@
</group>
<group name="HTMLGenerator">
- <sample name="Yahoo Screen Scrape" href="yahoo">
- Shows how to get remote resource and convert it to valid HTML using HTMLGenerator
+ <sample name="Google News Sci/Tech" href="googlenews">
+ Shows how to get remote resource and convert it to valid XHTML using HTMLGenerator.
</sample>
</group>
</samples>
1.4 +6 -6 cocoon-2.1/src/blocks/html/samples/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/html/samples/sitemap.xmap,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sitemap.xmap 29 Jul 2003 03:15:46 -0000 1.3
+++ sitemap.xmap 16 Aug 2003 15:17:10 -0000 1.4
@@ -44,12 +44,12 @@
<!-- ================ TIDY =========================== -->
- <map:match pattern="yahoo">
- <map:generate type="html" src="http://www.yahoo.com">
- <map:parameter name="xpath" value="/html/body/center/table[4]/tr[1]/td[1]"/>
+ <map:match pattern="googlenews">
+ <map:generate type="html" src="http://news.google.com/news/en/us/technology.html">
+ <map:parameter name="xpath" value="/html"/>
</map:generate>
- <!-- map:transform src="stylesheets/news.xsl"/ -->
- <map:serialize type="html"/>
+ <map:transform src="stylesheets/googlenews.xsl"/>
+ <map:serialize type="xhtml"/>
</map:match>
</map:pipeline>