Dear All,
I'm trying to use asp.net to parse in an RSS version 1.0 feed and output XML
but I'm having trouble with the XSL file I'm trying to use. For some reason
in the ouput of the transformation the XML namespaces are brought across
from the XML file into the HTML. They appear as part of the <p> tag. For
each item the <p> tag ends up being:
<p xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http ://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foo="http ://purl.org/rss/1.0/">
The XSL file I'm using is as follows.
<?xml version="1.0" encoding="utf-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http ://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foo="http ://purl.org/rss/1.0/">
<xsl:output method="html" omit-xml-declaration="ye s"/>
<xsl:template match="/">
<xsl:for-each select="rdf:RDF/foo:item">
<p>
<b><xsl:value-of select="foo:tit le"/></b><br/>
Author: <xsl:value-of select="foo:des cription"/><br/>
<a> <xsl:attribut e name="href"><xs l:value-of select="foo:lin k"/>
</xsl:attribute>V isit the Article</a>
</p>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Any thoughts appreciated.
With thanks.
-Corey
I'm trying to use asp.net to parse in an RSS version 1.0 feed and output XML
but I'm having trouble with the XSL file I'm trying to use. For some reason
in the ouput of the transformation the XML namespaces are brought across
from the XML file into the HTML. They appear as part of the <p> tag. For
each item the <p> tag ends up being:
<p xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http ://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foo="http ://purl.org/rss/1.0/">
The XSL file I'm using is as follows.
<?xml version="1.0" encoding="utf-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http ://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foo="http ://purl.org/rss/1.0/">
<xsl:output method="html" omit-xml-declaration="ye s"/>
<xsl:template match="/">
<xsl:for-each select="rdf:RDF/foo:item">
<p>
<b><xsl:value-of select="foo:tit le"/></b><br/>
Author: <xsl:value-of select="foo:des cription"/><br/>
<a> <xsl:attribut e name="href"><xs l:value-of select="foo:lin k"/>
</xsl:attribute>V isit the Article</a>
</p>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Any thoughts appreciated.
With thanks.
-Corey
Comment