XSL RSS feed help

knappster

Active member
Joined
Nov 13, 2006
Messages
42
Programming Experience
Beginner
Hi,
I have an rss feed from
http://www.thisismoney.co.uk/xml/page-rss.xml?in_page_id=6

and use the following xsl file:

VB.NET:
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited by Lee Sykes DNN Creative Magazine http://www.dnncreative.com -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:param name="TITLE"/>
<xsl:template match="rss">
<!-- Do not show channel image -->
  <xsl:for-each select="channel/item">
    <br>
 <!-- to open links in a new window, change target="_main" to target="_new" -->
    <strong><a href="{link}" target="_new"><xsl:value-of select="title"/></a></strong></br>
     <!--<br>
    <xsl:value-of select="pubDate"/>
    </br>-->
	<br />
    <!-- only display markup for description if it's present -->
    <xsl:value-of disable-output-escaping="yes" select="description"/>
  </xsl:for-each>
  <br></br>
</xsl:template>
<xsl:template match="description">
  <br>
    <xsl:value-of select="."/>
  </br>
</xsl:template>
</xsl:stylesheet>

However, if you go to the rss feed source you can see that there is an <img> tag within the <description> tag and the width and height are set. These are too big for what I want on my site, how can I make the images smaller??
 
The markup tags are just escape sequences in the description node string and you can't process them with XSL. One option is to use CSS formatting to set dimension style attributes for all IMG tags, this can be absolute/min/max width/height.
 
Back
Top