I've had this problem for a couple of weeks now, so any help is immensely appreciated. The below feed will work in IE7, but not IE6 or Firefox - the problem is the actual feed items not showing up - any other text I add, like the <h2> is fine. The XML file does validate.
XML file:
XSL file:
If I adjust the namespace line in the XML to
then it works in IE6 but not IE7! It'll let me write anything in place of the 'atom' text actually and work in IE6. I'm baffled. Hopefully it's something simple one of you folk will notice straightaway.
XML file:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="news-feed.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Latest News</title>
<updated>2008-01-11T11:00:00+00:00</updated>
<id>tag:www.---.co.uk,2007-12-03:/news.asp</id>
<link rel="alternate" href="http://www.---.co.uk/news.asp"/>
<link rel="self" href="http://www.---.co.uk/news-feed.asp"/>
<rights>---</rights>
<logo>http://www.---.co.uk/feed/logo.gif</logo>
<author>
<name>---</name>
<uri>http://www.---.co.uk</uri>
</author>
<entry>
<title>Blah de blah do blah di blooh</title>
<link rel="alternate" href="http://www.---.co.uk/news_story.asp?id=2197"/>
<content type="html"><![CDATA[W sgfsh ofhwof whfihw ifwefb wkebf wilksbqwodp qjskdf]]></content>
<id>tag:www.---.co.uk,2007-12-03:/news_story.asp?id=2197</id>
<updated>2008-01-11T11:00:00+00:00</updated>
</entry>
<entry>
<title>Poopy</title>
<link rel="alternate" href="http://www.---.co.uk/news_story.asp?id=2196"/>
<content type="html"><![CDATA[Kj owbeiofn wfnwf fbskdf wefnqodq svbkdsg]]></content>
<id>tag:www.---.co.uk,2007-12-03:/news_story.asp?id=2196</id>
<updated>2008-01-10T16:50:00+00:00</updated>
</entry>
</feed>
XSL file:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:atom="http://www.w3.org/2005/Atom">
<xsl:output method="html" encoding="ISO-8859-1"/>
<xsl:template match="/">
<xsl:element name="html">
<head>
<title>---</title>
</head>
<body>
<h2 style="color: #ff3300;">Latest News</h2>
<xsl:for-each select="feed/entry">
<div style="color:#000000; padding: 0.3em;">
<h3 style="font-size: 1em; padding: 0em; margin: 0em;">
<a><xsl:attribute name="href"><xsl:value-of select="link/@href" /></xsl:attribute><xsl:value-of select="title" disable-output-escaping="yes" /></a>
</h3>
</div>
<div style="margin-left: 0.5em; margin-bottom: 0.9em; font-size:0.8em;">
<xsl:value-of select="description" />
<span><xsl:value-of select="content" /></span>
</div>
</xsl:for-each>
</body>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
If I adjust the namespace line in the XML to
Code:
<feed xmlns[COLOR="DarkOrange"]:atom[/COLOR]="http://www.w3.org/2005/Atom">