transform RDF to HTML via XSL and PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello :)
I wish to add the FreeBSD news in my site
but I can't transform the RDF document:
http://www.freebsd.org/news/news.rdf
I have a little knowledge in XML XSL but it seems that isn't enough :)
here is my XSL script:

=======================================================================
<?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#";>
<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/item">
      <tr>
        <td><xsl:value-of select="title"/></td>
        <td><xsl:value-of select="link"/></td>
      </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>
/======================================================================

why doesn't this work ?
it outputs this:

=======================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd";>
<html><body><table border="1"></table></body></html>
/======================================================================

I believe that my mistake is in the '<xsl:for-each select="//rdf:RDF/item">' tag
I've tried also '//rdf:item', '/rdf:item', 'rdf:item', '/rdf:RDF/item', 'rdf:RDF/item' but with the same result
how can I catch this ?
can anyone help me please ?
thank you :)


-----------------------------------------------------------------
http://www.sportni.bg/worldcup/ - Германия 2006 - Световното първенство по футбол наближава!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux