On Wed, Nov 01, 2000 at 08:41:01PM +0000, Matt Sergeant wrote:
> > > Try /* then.
> >
> > I'm afraid that doesn't cut it either.
>
> OK, I think I'm finding what the problem is. Slashdot's rss file (this is
> rss we're really dealing with here, there's very little rdf involved at
> this point) uses namespaces. So you're going to have to define an
> rss: namespace in your XSLT document. This should work:
>
> <?xml version="1.0"?>
> <xsl:stylesheet 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:rss="http://my.netscape.com/rdf/simple/0.9/"
> >
>
> <xsl:template match="/rdf:RDF">
> <xsl:apply-templates select="rss:item" />
> </xsl:template>
>
> <xsl:template match="rss:item">
> title:<xsl:value-of select="rss:title" />
> link:<xsl:value-of select="rss:link" />
> </xsl:template>
>
> </xsl:stylesheet>
Ok that works, but i have absolutely no clue why that happens. You
introduced a new namespace (either it's rss or foo it equally works) that is
not ever mentioned in the XML source. Why introducing a bogus namespace in
the stylesheet works for rendering content in xml (that doesn't mention the
namespace in question).
this is rather puzzling to me.
--
Tiago Pascoal ([EMAIL PROTECTED]) FAX : +351-1-7273394
Politicamente incorrecto, e membro (nao muito) proeminente da geracao rasca.
Recem empossado (engajado) cidadao da republica das bananas.
It is necessary to have purpose.
-- Alice #1, "I, Mudd", stardate 4513.3