add alt attribute for preview images in XML version of news items

pull/2492/head
Max Mehl 11 months ago
parent c37356a273
commit 2637ffb855
Signed by: max.mehl
GPG Key ID: 2704E4AB371E2E92

@ -21,18 +21,22 @@
</xsl:attribute>
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="image"/>
<xsl:value-of select="image/@url"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="image/@alt"/>
</xsl:attribute>
<xsl:attribute name="alt"/>
</xsl:element><!-- img -->
</xsl:element><!-- a -->
</xsl:when>
<xsl:otherwise>
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="image"/>
<xsl:value-of select="image/@url"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="image/@alt"/>
</xsl:attribute>
<xsl:attribute name="alt"/>
</xsl:element><!-- img -->
</xsl:otherwise>
</xsl:choose>

@ -40,7 +40,12 @@
</xsl:element>
<xsl:element name="image">
<xsl:value-of select="/html/image/@url"/>
<xsl:attribute name="url">
<xsl:value-of select="/html/image/@url"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="/html/image/@alt"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="link">

Loading…
Cancel
Save