Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
RSS Feed to HTML using XSLT & JS
Old 05-21-2008, 02:23 PM RSS Feed to HTML using XSLT & JS
Average Talker

Posts: 15
Name: Kyle
Trades: 0
So what I'm doing is designing a homepage that displays the latest news from multiple RSS sources. I figure that once I get one of the feeds to show correctly, I can get the formatting right and just place each in its own div.

What I'm trying to do is something like iGoogle has, where I can click a button next to the title and a short description of the story shows up. So that's the first script in the html file. The second is transforming the XML (RSS) file using my XSLT. I'm trying to get it to display only 5 items as well, but I am not quite sure how to do that. It's probably just some simple code I'll have to add to the XSL, but I just don't know it. Also, when I click on the title to try to collapse the description, it always does the first story. You'll see when you try it. And while I'm at it, The CNN RSS feed has these stupid links to digg and some other stuff in every description. Is there a way to leave those out?


http://kyleblast3.web44.net/rss_stylesheet.xsl <---- XSL stylesheet

http://kyleblast3.web44.net/my_feeds.html <---HTML with JS scripts

There's the links to the files. You can check the source for code. The HTML page doesn't come up at all (it does when I'm using my local files), so that's another issue.

So here's what I would like to know: Getting maximum items to 5 (or any arbitrary number); getting the collapse to work on each individual element; getting it to work when uploaded; and getting those links out of the description. Thanks for your help!
kmoore11 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-28-2008, 01:09 PM Re: RSS Feed to HTML using XSLT & JS
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
The problem is you are trying to access a feed from a different server than your page.

The security in the browser prevents this.

The simplest way to make it work is to set up a cron job to wget the feed and store a copy on your server. Then make your page point to your copy.

refs:
http://www.adminschoice.com/docs/crontab.htm
http://www.linuxhelp.net/guides/cron/
http://www.gnu.org/software/wget/manual/wget.html
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to RSS Feed to HTML using XSLT & JS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10592 seconds with 12 queries