[43] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
| 2 | <xsl:stylesheet version="1.0" |
---|
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
---|
| 4 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
---|
| 5 | xmlns:dc="http://purl.org/dc/elements/1.1/" |
---|
| 6 | xmlns:rss="http://purl.org/rss/1.0/" |
---|
| 7 | xmlns:content="http://purl.org/rss/1.0/modules/content/" |
---|
| 8 | exclude-result-prefixes="rdf rss dc content"> |
---|
| 9 | |
---|
| 10 | <xsl:output method="html" /> |
---|
| 11 | |
---|
| 12 | <xsl:template match="/"> |
---|
| 13 | <xsl:apply-templates/> |
---|
| 14 | </xsl:template> |
---|
| 15 | |
---|
| 16 | <xsl:template match="rdf:RDF"> |
---|
| 17 | <html xml:lang="ja" lang="ja"> |
---|
| 18 | <head> |
---|
| 19 | <title>RSS from <xsl:value-of select="/rdf:RDF/rss:channel/rss:title"/></title> |
---|
| 20 | <meta http-equiv="Content-Style-Type" conent="text/css"/> |
---|
| 21 | </head> |
---|
| 22 | <body> |
---|
| 23 | <h2><a> |
---|
| 24 | <xsl:attribute name="href"> |
---|
| 25 | <xsl:value-of select="//rss:link"/> |
---|
| 26 | </xsl:attribute><xsl:value-of select="//rss:title"/> |
---|
| 27 | </a></h2> |
---|
| 28 | <p> |
---|
| 29 | <!--<a> |
---|
| 30 | <xsl:attribute name="href"> |
---|
| 31 | <xsl:value-of select="//rss:link"/> |
---|
| 32 | </xsl:attribute> |
---|
| 33 | <xsl:value-of select="//rss:title"/> |
---|
| 34 | </a>--> |
---|
| 35 | 最終更新日:<xsl:value-of select="//dc:date"/> |
---|
| 36 | </p> |
---|
| 37 | <hr color="orange"/> |
---|
| 38 | <xsl:apply-templates select="rss:item"/> |
---|
| 39 | </body> |
---|
| 40 | </html> |
---|
| 41 | </xsl:template> |
---|
| 42 | |
---|
| 43 | <xsl:template match="rss:item"> |
---|
| 44 | <div bgcolor="red"> |
---|
| 45 | <h2> |
---|
| 46 | <a> |
---|
| 47 | <xsl:attribute name="href"> |
---|
| 48 | <xsl:value-of select="rss:link"/> |
---|
| 49 | </xsl:attribute> |
---|
| 50 | <xsl:value-of select="rss:title"/> |
---|
| 51 | </a> |
---|
| 52 | </h2> |
---|
| 53 | <!-- <pre><xsl:value-of select="rss:description"/></pre> --> |
---|
| 54 | <xsl:value-of select="content:encoded" disable-output-escaping="yes"/> |
---|
| 55 | <hr color="orange"/> |
---|
| 56 | </div> |
---|
| 57 | </xsl:template> |
---|
| 58 | </xsl:stylesheet> |
---|