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

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
Hypertext links in an RSS feed
OO7girl




msg:662841
 2:47 pm on Jun 15, 2004 (gmt 0)

Hi again everyone,

I am trying to insert some links (to different websites) into my RSS feed. I don't want the "news items" themselves to be links, however; instead, I want to have a "read more" link *below* each news item that will link to a page of archived news items.

I can't seem to find a simple answer anywhere - maybe there is none?

Any help you could provide would be greatly appreciated.

 

john_k




msg:662842
 1:55 pm on Jun 16, 2004 (gmt 0)

Generally this is done with the <link> element:

<item>
<title>This is headline one</title>
<link>http://www.example.com/news/123-1.htm</link>
</item>
<item>
<title>This is headline two</title>
<link>http://www.example.com/news/123-2.htm</link>
</item>

It is left to the consumer (RSS news reader app) to determine how the link should be presented. Some will simply make the title text into a link. Others will add a "read more..." type link. Others will just ignore it.

OO7girl




msg:662843
 2:21 pm on Jun 16, 2004 (gmt 0)

Thanks for the reply!

I've tried using the <link> tag, but it doesn't seem to make the links "clickable" in my browser OR the aggregator I am using to preview my feed. (I'm using a stylesheet to format the XML files so that they'll fit with the look of my site when they are pulled up by the browser.)

Here is what I am working with: <snip>

Is it going to be impossible for me to get clickable links in both browsers and RSS aggregators? At this point, I would settle for either...I'm pulling my hair out here. :/

Thanks again!

[edited by: Woz at 4:42 am (utc) on June 17, 2004]
[edit reason] No URLs please, see TOS#13 [/edit]

john_k




msg:662844
 2:58 pm on Jun 16, 2004 (gmt 0)

Funny - the RSS that I provide is on the same subject matter!

I am sending you a link to it via sticky mail. I is currently used by people from MyYahoo and other services. It is also used by some private websites.

Again, it is the responsibility of the aggregator to utilize the provided link element. The RSS feed is supposed to provide information with meta data so that the consuming application can format it the way that best suits it.

OO7girl




msg:662845
 3:04 pm on Jun 16, 2004 (gmt 0)

How weird that you also do war stuff! I'm a summer student working for the National War Museum in Canada. :)

Do you have any thoughts on how I might make the XML files as pulled up by the browser include clickable links? I've tried inserting HTML tags (<a href...>), but the browser won't read them since they're in the content of an XML file, I guess. I now have the links working OK within my aggregator.

I found this article (http://developer.apple.com/internet/webcontent/xmltransformations.html), but it seems awfully complicated.

~:(

OO7girl




msg:662846
 3:06 pm on Jun 16, 2004 (gmt 0)

Ok, so your feed isn't specifically war-related...I read your post before receiving the stickymail. Hehe. Still, interesting :)

john_k




msg:662847
 3:11 pm on Jun 16, 2004 (gmt 0)

Do you have any thoughts on how I might make the XML files as pulled up by the browser include clickable links?

This is a tough issue. If you are readily giving the information away, and you don't seriously mind that some users won't include the links, then just use RSS as you are and hope for the best.

If you want to make sure they include links, or if you want to enforce any other formatting/presentation aspects of your feed, then you have two choices. The first is to manually police the sites or software that uses the feed. This is not very practical. The other is to provide the feed as javascript or IFrame content instead. This is the primary way that I deliver my feeds.

They are free to the websites that use them. What I get out of it is name recognition and branding.

OO7girl




msg:662848
 3:26 pm on Jun 16, 2004 (gmt 0)

The main purpose of my RSS feed is to have it be displayed in a browser, under a "calendar" that will allow users to pick which RSS feed they want to view by date. I have a JavaScript that automatically displays the correct XML file depending on what the date is. The ability to have the info readable in aggregators, should anyone choose to include it on their site, is pretty much an added bonus.

I actually do plan to have the feed displayed in an iframe (below the calendar) - how would this affect my ability to have clickable links?

john_k




msg:662849
 3:37 pm on Jun 16, 2004 (gmt 0)

how would this affect my ability to have clickable links?

If it's in an IFrame by itself, then you can just send plain html instead of xml. So you have complete control.

OO7girl




msg:662850
 3:42 pm on Jun 16, 2004 (gmt 0)

I'm not sure I understand - how will loading the XML files into an iframe turn them into HTML files?

john_k




msg:662851
 4:09 pm on Jun 16, 2004 (gmt 0)

how will loading the XML files into an iframe turn them into HTML files?

Sorry I wasn't more clear. It doesn't. What I meant was, if you know the content will be displayed in an IFrame, then you might consider not using RSS/XML at all. When the user clicks the calendar, that link can point to a standard HTML (or php/asp) page.

OO7girl




msg:662852
 4:33 pm on Jun 16, 2004 (gmt 0)

You're completely right, and I wish I could do that, but the webmaster here is hoping to have only one set of files (as opposed to both XML and HTML for each date), and he really wants the RSS feed, so...

Thanks very much for your help though!

john_k




msg:662853
 4:56 pm on Jun 16, 2004 (gmt 0)

Is the Brinkster link you posted pulling HTML from your site and then creating the RSS feed for you? Or do you have code on your site that directly provides the RSS?

If you use your own code to create your RSS directly on your site, then you can also create a file to consume your own RSS and deliver it in the html format you want. That is what would go into your iframe. That way the RSS is still available for other uses.

OO7girl




msg:662854
 7:38 pm on Jun 16, 2004 (gmt 0)

That sounds good - I am indeed creating my own RSS from scratch.

How would I go about doing that?

john_k




msg:662855
 7:43 pm on Jun 16, 2004 (gmt 0)

How would I go about doing that?

Not sure what part you are asking about.

OO7girl




msg:662856
 10:04 pm on Jun 16, 2004 (gmt 0)

Sorry - how would I "create a file to consume my own RSS and deliver it in the html format I want".

john_k




msg:662857
 1:55 pm on Jun 17, 2004 (gmt 0)

The process you need to find out about goes under the names of "xslt", "xsl transformation", "server side transformation", etc.

The method will of course depending on your programming/scripting language. There are quite a few examples available for php and asp/vbscript.

OO7girl




msg:662858
 2:07 pm on Jun 17, 2004 (gmt 0)

Thanks again, Jon...unfortunately I can't do anything server-side in this case, but I think I have now found a work-around :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
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