XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 Processing RSS
Subject: Here's an XSLT solution
Date: 2003-04-13 17:39:14
From: Steve Cassidy

Just as brief, perhaps simpler, needs a null XML document to bootstrap (containing just <rsslist/>)



<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">


<xsl:output method="html"/>


<xsl:template match="/rsslist">
<html>
<body>
<xsl:apply-templates select='document("http://www.javablogs.com/ViewDaysBlogs.jspa?view=rss")'/>
<xsl:apply-templates select='document("http://radio.weblogs.com/0109827/rss.xml")'/>
</body>
</html>
</xsl:template>



<xsl:template match="channel/item">
<div>
RSS item <xsl:value-of select="title"/> is located at
<xsl:value-of select="link"/>

</div>
</xsl:template>


</xsl:stylesheet>


Previous Message Previous Message   Next Message Next Message

Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938