Re: Re: [PHP] transform RDF to HTML via XSL and PHP
xsl:template match=rdf:RDF html body table border=1 xsl:for-each select=item tr tdxsl:value-of select=title//td tdxsl:value-of select=link//td /tr /xsl:for-each /table /body /html /xsl:template /xsl:stylesheet I'ts been awhile, but try the above. -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html nope it doesn't work like this still the same result I think the problem is in the way that I'm accessing the elements how exactly this should be done ?... - http://www.sportni.bg/worldcup/ - Германия 2006 - Световното първенство по футбол наближава! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] transform RDF to HTML via XSL and PHP
Mario Pavlov wrote: nope it doesn't work like this still the same result I think the problem is in the way that I'm accessing the elements how exactly this should be done ?... Its due to default namespaces in the feed. The item elements and its child elements are in the default namespace: http://my.netscape.com/rdf/simple/0.9/ You need to declare this namespace with a prefix in order to access the elements within the stylesheet (same as using XPath). i.e. the following stylesheet uses the prefix rdf9 for that namespace. ?xml version=1.0 encoding=ISO-8859-1? 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:rdf9=http://my.netscape.com/rdf/simple/0.9/; xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/ xsl:template match=/ html body table border=1 xsl:for-each select=//rdf:RDF/rdf9:item tr tdxsl:value-of select=rdf9:title//td tdxsl:value-of select=rdf9:link//td /tr /xsl:for-each /table /body /html /xsl:template /xsl:stylesheet Rob -- [EMAIL PROTECTED] author of Pro PHP XML and Web Services from Apress thank you man!! :) I can't believe it, it just WORKS :) thank you very much! it took me about a week ... thank you again! :) god bless you :) - http://www.sportni.bg/worldcup/ - Германия 2006 - Световното първенство по футбол наближава! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php