comparison myrss/step1.xsl @ 10:23235139f34d

myrss: more rss feeds, add hover underline to links
author paulo@twcdns.fastsearch.net
date Mon, 13 Sep 2010 01:46:43 -0700
parents 2be1a035d725
children ab0455f2a832
comparison
equal deleted inserted replaced
0:e1041e26f01e 1:02822ece0e89
1 <?xml version="1.0" encoding="ISO-8859-1"?> 1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.w3.org/2005/Atom" xmlns="http://www.pauloang.com/"> 2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:a="http://www.w3.org/2005/Atom"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:r1="http://purl.org/rss/1.0/"
7 xmlns="http://www.pauloang.com/">
3 8
9 <!-- Atom -->
4 <xsl:template match="/a:feed"> 10 <xsl:template match="/a:feed">
5 <site> 11 <site>
6 <title><xsl:value-of select="a:title"/></title> 12 <title><xsl:value-of select="a:title"/></title>
7 <link><xsl:value-of select="a:link/@href"/></link> 13 <link><xsl:value-of select="a:link/@href"/></link>
8 <xsl:for-each select="a:entry"> 14 <xsl:for-each select="a:entry">
12 </headline> 18 </headline>
13 </xsl:for-each> 19 </xsl:for-each>
14 </site> 20 </site>
15 </xsl:template> 21 </xsl:template>
16 22
23 <!-- RSS -->
17 <xsl:template match="rss/channel"> 24 <xsl:template match="rss/channel">
18 <site> 25 <site>
19 <title><xsl:value-of select="title"/></title> 26 <title><xsl:value-of select="title"/></title>
20 <link><xsl:value-of select="link"/></link> 27 <link><xsl:value-of select="link"/></link>
21 <xsl:for-each select="item"> 28 <xsl:for-each select="item">
25 </headline> 32 </headline>
26 </xsl:for-each> 33 </xsl:for-each>
27 </site> 34 </site>
28 </xsl:template> 35 </xsl:template>
29 36
37 <!-- RDF -->
38 <xsl:template match="rdf:RDF">
39 <site>
40 <title><xsl:value-of select="r1:channel/r1:title"/></title>
41 <link><xsl:value-of select="r1:channel/r1:link"/></link>
42 <xsl:for-each select="r1:item">
43 <headline>
44 <title><xsl:value-of select="r1:title"/></title>
45 <link><xsl:value-of select="r1:link"/></link>
46 </headline>
47 </xsl:for-each>
48 </site>
49 </xsl:template>
50
30 </xsl:stylesheet> 51 </xsl:stylesheet>