mirror of
https://github.com/aureliendavid/rsspreview.git
synced 2025-08-22 19:28:39 +00:00
add support for content:encoded in rss (#45)
This commit is contained in:
parent
90bce18337
commit
e6f6c1183e
28
rss.xsl
28
rss.xsl
@ -7,7 +7,8 @@
|
|||||||
xmlns:rss1="http://purl.org/rss/1.0/"
|
xmlns:rss1="http://purl.org/rss/1.0/"
|
||||||
xmlns:media="http://search.yahoo.com/mrss/"
|
xmlns:media="http://search.yahoo.com/mrss/"
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
exclude-result-prefixes="atom atom03 rdf rss1 media dc" >
|
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||||
|
exclude-result-prefixes="atom atom03 rdf rss1 media dc content" >
|
||||||
|
|
||||||
<xsl:param name="fullPreview" />
|
<xsl:param name="fullPreview" />
|
||||||
<xsl:param name="doAuthor" />
|
<xsl:param name="doAuthor" />
|
||||||
@ -69,18 +70,37 @@
|
|||||||
<xsl:if test='.//media:thumbnail/@url'>
|
<xsl:if test='.//media:thumbnail/@url'>
|
||||||
<img class="mediaThumb" src="{ .//media:thumbnail/@url }" width="{ .//media:thumbnail/@width }" height="{ .//media:thumbnail/@height }" />
|
<img class="mediaThumb" src="{ .//media:thumbnail/@url }" width="{ .//media:thumbnail/@width }" height="{ .//media:thumbnail/@height }" />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="not($fullPreview) and atom:summary | atom03:summary">
|
<xsl:when test="not($fullPreview)">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="description | rss1:description | atom:summary | atom03:summary">
|
||||||
<div class="feedRawContent" desctype="{atom:summary/@type | atom03:summary/@type }">
|
<div class="feedRawContent" desctype="{atom:summary/@type | atom03:summary/@type }">
|
||||||
<xsl:copy-of select="atom:summary | atom03:summary" />
|
<xsl:copy-of select="description | rss1:description | atom:summary | atom03:summary" />
|
||||||
</div>
|
</div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<div class="feedRawContent" desctype="{atom:content/@type | atom03:content/@type }">
|
<div class="feedRawContent" desctype="{atom:content/@type | atom03:content/@type }">
|
||||||
<xsl:copy-of select="description | rss1:description | atom:content | atom03:content" />
|
<xsl:copy-of select="content:encoded | rss1:description | atom:content | atom03:content" />
|
||||||
</div>
|
</div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="content:encoded | rss1:description | atom:content | atom03:content">
|
||||||
|
<div class="feedRawContent" desctype="{atom:content/@type | atom03:content/@type }">
|
||||||
|
<xsl:copy-of select="content:encoded | rss1:description | atom:content | atom03:content" />
|
||||||
|
</div>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<div class="feedRawContent" desctype="{atom:summary/@type | atom03:summary/@type }">
|
||||||
|
<xsl:copy-of select="description | rss1:description | atom:summary | atom03:summary" />
|
||||||
|
</div>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
<div class="enclosures">
|
<div class="enclosures">
|
||||||
<xsl:for-each select="enclosure | rss1:enclosure | atom:link[@rel='enclosure'] | atom03:link[@rel='enclosure']">
|
<xsl:for-each select="enclosure | rss1:enclosure | atom:link[@rel='enclosure'] | atom03:link[@rel='enclosure']">
|
||||||
|
Loading…
Reference in New Issue
Block a user