Trouble with xsl displaying xml with rdf tag

Here is basically what the xml file looks like.

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="vanguard.xsl"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/">

<channel>
<title>The Title here</title>
<description>The Description here</description>
<link>http://thelink.com</link>
</channel>

<item>
<title> The Title here 10/17/04 11:36:11 am</title>
<description> The Description here </description>
<link> thelink.com </link>
</item>

<item>
<title> The Title here 10/17/04 11:36:11 am</title>
<description> The Description here </description>
<link> thelink.com </link>
</item>
</rdf:RDF>

And here is the xsl file.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://my.netscape.com/rdf/simple/0.9/"
version="1.0" >
<xsl: output method="html" indent="yes" />
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="rdf:RDF/channel">
<font color="#blue">
<b>
<a>
<xsl:attribute name="href">
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="title"/></a>
</b>
</font>
<br></br>
<font color="black">
<xsl:value-of select="description"/>
</font>
</xsl:for-each>

<xsl:for-each select="rdf:RDF/item">
<font color="#blue">
<b>
<a>
<xsl:attribute name="href">
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="title"/></a>
</b>
</font>
<br></br>
<font color="black">
<xsl:value-of select="description"/>
</font>
<br></br>
<br></br>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

My problem is that it wont display the information. If I change this tag <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/">
in the xml file to something like <root> with the corresponding changes in the xsl file it works. But as it is it doesnt.

Any help please.
Thanks.
[2814 byte] By [BoomSlang] at [2007-11-19 1:39:14]
# 1 Re: Trouble with xsl displaying xml with rdf tag
As far as I can tell your problem is that 'xmlns="http://my.netscape.com/rdf/simple/0.9/"' namespace decleration, conflicts with you setting output method to HTML. I think setting output method implictily means that the default name space is empty. Changeing the default namespace decleration so it's nolonger the default namespace seems to fix the problem.
So changeing the XSL like this should do the trick

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:nsrdf="http://my.netscape.com/rdf/simple/0.9/"
version="1.0" >
<xsl: output method="html" indent="yes" />
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="rdf:RDF/nsrdf:channel">
<font color="#blue">
<b>
<a>
<xsl:attribute name="href">
<xsl:value-of select="nsrdf:link"/>
</xsl:attribute>
<xsl:value-of select="nsrdf:title"/></a>
</b>
</font>
<br></br>
<font color="black">
<xsl:value-of select="nsrdf:description"/>
</font>
</xsl:for-each>

<xsl:for-each select="rdf:RDF/nsrdf:item">
<font color="#blue">
<b>
<a>
<xsl:attribute name="href">
<xsl:value-of select="nsrdf:link"/>
</xsl:attribute>
<xsl:value-of select="nsrdf:title"/></a>
</b>
</font>
<br></br>
<font color="black">
<xsl:value-of select="nsrdf:description"/>
</font>
<br></br>
<br></br>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
khp at 2007-11-10 3:27:59 >
# 2 Re: Trouble with xsl displaying xml with rdf tag
Thanks. That did the trick. I have been at this for a couple of days, xml is not my specialty.

Thanks again.
BoomSlang at 2007-11-10 3:28:59 >