xsl/portal2items: replace unknown xpath function

This commit is contained in:
Astro 2017-09-30 01:33:59 +02:00
parent 9efb6b2a67
commit c1acece430
1 changed files with 11 additions and 1 deletions

View File

@ -56,9 +56,19 @@
<footer><xsl:value-of select="." disable-output-escaping="yes"/></footer>
</xsl:template>
<xsl:template match="atom:link[@rel='enclosure' and @href]" mode="gallery">
<xsl:variable name="href" select="substring-after(@href, '/mgoblin_media/')"/>
<content-image>
<xsl:text>/mgoblin_media/</xsl:text>
<xsl:value-of select="replace(substring-after(@href, '/mgoblin_media/'), '.jpg', '.medium.jpg')"/>
<xsl:choose>
<xsl:when test="contains($href, '.jpg')">
<xsl:value-of select="concat(substring-before($href, '.jpg'), '.medium.jpg')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$href"/>
</xsl:otherwise>
</xsl:choose>
</content-image>
</xsl:template>
<xsl:template match="atom:link[@rel='alternate' and @href]" mode="gallery">