diff myrss/step1.xsl @ 7:4d7f45e51e8e

add step2.xsl; add RDF to step1.xsl
author paulo@twcdns.fastsearch.net
date Sat, 11 Sep 2010 03:35:23 -0700
parents 2be1a035d725
children ab0455f2a832
line diff
     1.1 --- a/myrss/step1.xsl	Sat Sep 11 02:49:56 2010 -0700
     1.2 +++ b/myrss/step1.xsl	Sat Sep 11 03:35:23 2010 -0700
     1.3 @@ -1,6 +1,12 @@
     1.4  <?xml version="1.0" encoding="ISO-8859-1"?>
     1.5 -<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/">
     1.6 +<xsl:stylesheet version="1.0"
     1.7 +		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     1.8 +		xmlns:a="http://www.w3.org/2005/Atom"
     1.9 +		xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    1.10 +		xmlns:r1="http://purl.org/rss/1.0/"
    1.11 +		xmlns="http://www.pauloang.com/">
    1.12  
    1.13 +<!-- Atom -->
    1.14  <xsl:template match="/a:feed">
    1.15  <site>
    1.16  <title><xsl:value-of select="a:title"/></title>
    1.17 @@ -14,6 +20,7 @@
    1.18  </site>
    1.19  </xsl:template>
    1.20  
    1.21 +<!-- RSS -->
    1.22  <xsl:template match="rss/channel">
    1.23  <site>
    1.24  <title><xsl:value-of select="title"/></title>
    1.25 @@ -27,4 +34,18 @@
    1.26  </site>
    1.27  </xsl:template>
    1.28  
    1.29 +<!-- RDF -->
    1.30 +<xsl:template match="rdf:RDF">
    1.31 +<site>
    1.32 +<title><xsl:value-of select="r1:channel/r1:title"/></title>
    1.33 +<link><xsl:value-of select="r1:channel/r1:link"/></link>
    1.34 +<xsl:for-each select="r1:item">
    1.35 +	<headline>
    1.36 +	<title><xsl:value-of select="r1:title"/></title>
    1.37 +	<link><xsl:value-of select="r1:link"/></link>
    1.38 +	</headline>
    1.39 +</xsl:for-each>
    1.40 +</site>
    1.41 +</xsl:template>
    1.42 +
    1.43  </xsl:stylesheet>