Korrekte img-src in ATOM- & RSS-Feed

git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@412 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
astro 2006-07-13 16:17:49 +00:00
parent d07aba67bf
commit 19c3c83b5c
2 changed files with 22 additions and 1 deletions

View File

@ -66,4 +66,20 @@
</xsl:for-each>
</entry>
</xsl:template>
<xsl:template match="item/image">
<img>
<xsl:choose>
<xsl:when test="contains(., '://')">
<xsl:attribute name="src"><xsl:value-of select="."/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="src"><xsl:value-of select="concat($baseurl, 'images/news/', .)"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="title"/></xsl:attribute>
</img>
</xsl:template>
</xsl:stylesheet>

View File

@ -68,7 +68,12 @@
</xsl:template>
<xsl:template match="image" mode="escaped">
&lt;img src="<xsl:value-of select="."/>"<xsl:if test="@title"> title="<xsl:value-of select="@title"/>" alt="<xsl:value-of select="@title"/>"</xsl:if><xsl:if test="@class"> class="<xsl:value-of select="@class"/>"</xsl:if>/&gt;
<xsl:variable name="url"><xsl:choose>
<xsl:when test="contains(., '://')"><xsl:value-of select="."/></xsl:when>
<xsl:otherwise><xsl:value-of select="concat($baseurl, 'images/news/', .)"/></xsl:otherwise>
</xsl:choose></xsl:variable>
&lt;img src="<xsl:value-of select="$url"/>"<xsl:if test="@title"> title="<xsl:value-of select="@title"/>" alt="<xsl:value-of select="@title"/>"</xsl:if><xsl:if test="@class"> class="<xsl:value-of select="@class"/>"</xsl:if>/&gt;
</xsl:template>
<xsl:template match="link" mode="escaped">