cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Including rdf newsfeeds
Date Sun, 27 Apr 2003 13:45:26 GMT
On Sun, Apr 27, 2003 at 03:04:01PM +0200, Hugo Burm wrote:
> My rdf newsfeed gives me something like this:
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <rdf:RDF
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> xmlns="http://my.netscape.com/rdf/simple/0.9/">
> <item>
>  <title>Windows Server 2003 hat Probleme mit anderen
> Microsoft-Programmen</title>
>  <link>http://www.heise.de/newsticker/data/jes-27.04.03-001/</link>
> </item>
> </rdf:RDF>
> 
> It took me hours to put this on my Cocoon screen. Finally 
> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101825172608308
> solved the problem. 
> This stylesheet is working:
> 
> <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:n-rdf="http://my.netscape.com/rdf/simple/0.9/"
> >
> <xsl:template match="/">
> 	<table>
> 		<xsl:apply-templates />	
> 	</table>
> </xsl:template>
> <xsl:template match="n-rdf:item">
> <tr><td>
> 	<xsl:value-of select="./n-rdf:link"/>
> </td></tr>
> </xsl:template>
> </xsl:stylesheet>
> 
> Please note that I replaced 'xmlns="http://my.netscape.com/rdf/simple/0.9/"'
> with some dummy namespace (xmlns:n-rdf) and that my stylesheet successfully
> matches this dummy namespace tags.
> 
> I don't feel comfortable because I have no idea what is going on. Can
> somebody explain? What about this dummy namespace? Am I tied to some 0.9
> version kept somewhere in the archives of Netscape?

In XSLT you cannot use the default namespace to match elements, you need
some non-null prefix (here, 'n-rdf').  See section 2.1 of
http://www.w3.org/TR/xslt20req


--Jeff

> 
> Hugo
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message