-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a66512
commit 17bfb20
Showing
6 changed files
with
76 additions
and
46 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,82 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:atom="http://www.w3.org/2005/Atom" exclude-result-prefixes="atom" > | ||
xmlns:atom="http://www.w3.org/2005/Atom" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:rss1="http://purl.org/rss/1.0/" | ||
exclude-result-prefixes="atom rdf" > | ||
|
||
<xsl:output method="html" indent="yes" encoding="utf-8" /> | ||
|
||
|
||
<xsl:template match="channel | atom:feed"> | ||
<xsl:template match="channel | atom:feed | rss1:channel"> | ||
|
||
|
||
<div id="feedTitle"> | ||
<a id="feedTitleLink"> | ||
<img id="feedTitleImage" src="{image/url | atom:logo}" /> | ||
<img id="feedTitleImage" src="{image/url | atom:logo | rss1:image/rss1:url }" /> | ||
</a> | ||
<div id="feedTitleContainer"> | ||
<h1 id="feedTitleText" > | ||
<a href="{link | atom:link[@rel='alternate']/@href}" target="_blank"> | ||
<xsl:value-of select="title | atom:title" /> | ||
<a href="{link | atom:link[@rel='alternate']/@href | rss1:link}" target="_blank"> | ||
<img src="icons/home.png" class="headerIcon" /> | ||
<xsl:value-of select="title | atom:title | rss1:title" /> | ||
</a> | ||
</h1> | ||
<h2 id="feedSubtitleText" ><xsl:value-of select="description | atom:subtitle" /></h2> | ||
<h2 id="feedSubtitleText" ><xsl:value-of select="description | atom:subtitle | rss1:description" /></h2> | ||
<!--div class="lastUpdated">Last updated: <xsl:value-of select="lastBuildDate | atom:updated" /></div--> | ||
</div> | ||
</div> | ||
|
||
|
||
<div id="feedContent"> | ||
<xsl:apply-templates select="item | atom:entry " /> | ||
</div> | ||
|
||
<xsl:for-each select="item | atom:entry"> | ||
|
||
<div class="entry"> | ||
|
||
<h3> | ||
<xsl:choose> | ||
<xsl:when test="link | atom:link[@rel='alternate']/@href"> | ||
<a href="{link | atom:link[@rel='alternate']/@href}" target="_blank"> | ||
<span><xsl:value-of select="title | atom:title" /></span> | ||
</a> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<span><xsl:value-of select="title | atom:title" /></span> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
|
||
<div class="lastUpdated"><xsl:value-of select="pubDate | atom:updated" /></div> | ||
</h3> | ||
<div class="feedEntryContent"> | ||
<xsl:value-of select="description | atom:summary" disable-output-escaping="yes" /> | ||
</div> | ||
<div class="enclosures"> | ||
<xsl:for-each select="enclosure | atom:link[@rel='enclosure']"> | ||
|
||
<div class="enclosure"> | ||
<img src="icons/file.png" class="enclosureIcon" /> | ||
<a href="{@url | @href}" target="_blank" class="enclosureFilename"><xsl:value-of select="@url | @href" /></a> | ||
(<xsl:value-of select="@type" />, <span class="enclosureSize"><xsl:value-of select="@length" /></span>) | ||
</div> | ||
|
||
</xsl:for-each> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="item | atom:entry | rss1:item"> | ||
|
||
<div class="entry"> | ||
|
||
<h3> | ||
<xsl:choose> | ||
<xsl:when test="link | atom:link[@rel='alternate']/@href | rss1:link"> | ||
<a href="{link | atom:link[@rel='alternate']/@href | rss1:link}" target="_blank"> | ||
<span><xsl:value-of select="title | atom:title | rss1:title" /></span> | ||
</a> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<span><xsl:value-of select="title | atom:title | rss1:link" /></span> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
|
||
<div class="lastUpdated"><xsl:value-of select="pubDate | atom:updated | rss1:pubDate" /></div> | ||
</h3> | ||
<div class="feedEntryContent"> | ||
<xsl:value-of select="description | atom:summary | rss1:description" disable-output-escaping="yes" /> | ||
</div> | ||
<div style="clear: both;"></div> | ||
<div class="enclosures"> | ||
<xsl:for-each select="enclosure | atom:link[@rel='enclosure'] | rss1:enclosure"> | ||
|
||
</xsl:for-each> | ||
<div class="enclosure"> | ||
<img src="icons/file.png" class="enclosureIcon" /> | ||
<a href="{@url | @href}" target="_blank" class="enclosureFilename"><xsl:value-of select="@url | @href" /></a> | ||
(<xsl:value-of select="@type" />, <span class="enclosureSize"><xsl:value-of select="@length" /></span>) | ||
</div> | ||
|
||
</div> | ||
</xsl:for-each> | ||
</div> | ||
|
||
</div> | ||
<div style="clear: both;"></div> | ||
|
||
</xsl:template> | ||
|
||
|
||
<xsl:template match="/"> | ||
<xsl:apply-templates select="//channel | //atom:feed" /> | ||
<xsl:apply-templates select="//channel | //atom:feed | //rss1:channel " /> | ||
<xsl:apply-templates select="//rss1:item " /> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters