Posted By

radeks on 08/30/09


Tagged

xslt RSS-READER


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

tschloss
Tyster


Simple XSLT RSS Reader


 / Published in: XSLT
 

A simple RSS reader written in XSLT

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4.  
  5. <xsl:template match="/">
  6. <html>
  7. <body>
  8. <h1><a href="{rss/channel/link}"><xsl:value-of select="rss/channel/title" /></a></h1>
  9. <p><xsl:value-of select="rss/channel/description" /></p>
  10. <ol>
  11. <xsl:for-each select="rss/channel/item">
  12. <li>
  13. <h1><a href="{link}"><xsl:value-of select="title" /></a></h1>
  14. <p><xsl:value-of select="description" /></p>
  15. </li>
  16. </xsl:for-each>
  17. </ol>
  18. </body>
  19. </html>
  20. </xsl:template>
  21.  
  22. </xsl:stylesheet>

Report this snippet  

You need to login to post a comment.