homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

Blog Aggregator: XML and XSLT
Blog Aggregator: XML and XSLT help

5+ Year Member

Msg#: 3959594 posted 9:57 pm on Jul 25, 2009 (gmt 0)

I am very new to XML & XSL but I know there is a way to build blog aggregators. I have a XML document that pulls the blogs in with the URI:

<?xml version="1.0"?>

<!DOCTYPE feeds SYSTEM "feeds.dtd">

<feed name="-------'s Blog"
<keyword name="meow"/>


I also have a .xsl document that prints all the blog entries out properly:

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

<xsl:output method="xml" indent="yes" />

<xsl:template match="/feeds" >
<xsl:for-each select="feed">
<xsl:element name="aml:blog">
<xsl:copy-of select="@uri"/>
<xsl:apply-templates select="document(@uri)" mode="document"/>
<xsl:apply-templates select="keyword" mode="document" />

<xsl:template match="rss/channel" mode="document">
<xsl:for-each select="item">
<xsl:sort order="descending" select="atom:updated/text()"/>
<xsl:copy-of select="."/>



Now the problem I am having is sorting by the keyword I indicated in the XML document. As you can see I tried using the apply-templates but it still pulls in all the blog entries.

Another thing I want to do is add more feeds to my XML file but different feeds do not use <pubDate> tags so how do I convert it to actualy print the <pubDate>. Any help would be most appreciated.

[edited by: httpwebwitch at 11:26 pm (utc) on July 26, 2009]
[edit reason] bleep out specifics, remove smilies [/edit]


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved