LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2005, 05:55 AM   #1
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Atom/RSS feed, need IE users to test...


[EDIT:]Please jump to my next post, as I have solved part of my problem.[/EDIT]

I have written a RSS1 generator, and an ATOM generator in PHP, for giving my site's news from my "*.news" files.

Unfortunately, even though (to my knowledge) each flow is conformant to its specification, I can't read them! Firefox extension for RSS/Atom says that both are unrecognized flows, and Thunderbird just hangs when adding either.

Could someone with knowledge in those protocols/languages, help me find what is wrong?

ATOM example:
http://yves.gablin.club.fr/_php/news...path=/all.news

related HTTP headers:
Content-type: application/atom+xml
Content-Disposition: attachment; filename="all.news.atom"

RSS1 example:
http://yves.gablin.club.fr/_php/news...path=/all.news
(note: I've tried removing entirely the DOCTYPE part, and thus using the full qualified values everywhere instead of entities, but to no avail...)

related HTTP headers:
Content-type: application/rss+xml
Content-Disposition: attachment; filename="all.news.rdf"

If I can solve the Atom problem, I'll consider myself happy and I'll remove RSS1. I won't remove Atom, though, because I like the ways it "fits" my needs.
Thanks,

Yves.

Last edited by theYinYeti; 06-06-2005 at 10:25 AM.
 
Old 05-30-2005, 03:59 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Validate them by http://feedvalidator.org/ It will show you the problems.
 
Old 05-31-2005, 02:46 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Original Poster
Rep: Reputation: 66
Thanks! I'll see what I can do from those reports.

Yves.
 
Old 06-03-2005, 12:44 PM   #4
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Original Poster
Rep: Reputation: 66
Things have changed. Both feeds are now correct. Actually, only two changes had to be done:
- remove the duplicate ID in the items,
- replace all entity references with Unicode references (eg: & amp ; -> & #38 ; (IIRC)).

Now my site has the Atom link on the index page, both on screen and in the header. Atom still uses too new a protocol for the validator, but it's OK with me: Firefox does recognize it, and displays the orange icon in the status bar. (FYI, having the RSS1 feed is just a matter of replacing the 'news-atom.php' part with 'news-rss1.php' in the URL).

So you could say I'm happy with the result... Well, I am, except that...

In order to inform people without a feed reader, I use an XSL stylesheet to transform the raw XML feed into an HTML page with explanations. To "please" Firefox, I had to:
- send the Atom (or RSS) content in application/xml instead of application/atom+xml (or rss+xml);
- remove the forementionned header ('Content-Disposition');
- write a get.php script, to be able to choose the MIME header myself, because FF goes into "strict" mode, and does not accept the XSL file if it does not come in application/xml.

I'm not really happy with this. Is there any workaround?

Besides, even though I know that XSL works in IE, *my* XSL does not. Could someone help me spot where the problem is (or if it simply is "my" IE that does not work).

For a start, I'd like to hear from you IE users: does my feed (when you click on the "ATOM" icon) display as HTML or XML? In what version of IE?

Thanks to all testers out there. My whole PHP framework will soon be released under GPL, and it will be in part thanks to you

Yves.
 
Old 06-06-2005, 10:34 AM   #5
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Original Poster
Rep: Reputation: 66
No IE users? Maybe my fault... I'll try and better explain what I need. It's really easy:

I'd like to know what you see when you click on one of the two links in the first post above. I need this from people using a XSL-aware browser that is *not* firefox (this one is working OK). This includes Internet Explorer 6 for example (maybe also 5.5).

You should see:

-A- either XML code like that:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?> 
  <?xml-stylesheet type="text/xsl" media="screen" href="get.php?mimetype=text/xml&...> 
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl...>
- <channel rdf:about="http://yves.gablin.club.fr/_php/news-rss1.php?nolog=1&filepath=...>
  <title>! Nouvelles !</title> 
  <link>http://yves.gablin.club.fr/</link> 
  <description>Nouvelles du site de Yves ET Iris</description> 
- <items>
- <rdf:Seq>
  <rdf:li rdf:resource="http://yves.gablin.club.fr/all.news/fr/20050404-233000" />
...
-B- or a nice HTML page, like that:
Code:
ATOM : ! News !

News for Iris and Yves web site

This is an Atom feed, styled with XSL and CSS

Atom is an alternative to HTML, that is dedicated to giving continuous information about ...
Please tell me if you see -A- or -B-, and with what version of what browser. Thank you.

Yves.

Last edited by theYinYeti; 06-07-2005 at 06:00 AM.
 
Old 06-06-2005, 02:56 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
I get XML both in Firefox (1.0.4) and Konqueror (3.3.2).
 
Old 06-07-2005, 02:54 AM   #7
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Original Poster
Rep: Reputation: 66
??? XML in Firefox? Had I more hair left, I'd pull it out from frustration! (As for Konqueror, I'm not sure it knows about XSL)

What about IE? Opera?

Yves.
 
Old 06-07-2005, 05:58 AM   #8
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Original Poster
Rep: Reputation: 66
OK. There's a bug in IE, and there's a bug in Firefox. I managed to make both happy, and commited changes. For me, IE now displays XSL-generated HTML, and so does Firefox (though in local, because it has no access to internet).

Refering to my next-to-previous post, do you all see -A- or -B-? With what?
Thanks,

Yves.
 
Old 06-07-2005, 10:01 AM   #9
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Original Poster
Rep: Reputation: 66
Actually, Firefox proves to be bug-free in this matter!
https://bugzilla.mozilla.org/show_bug.cgi?id=217479

Anyway... Any Opera user out there?
Thanks,

Yves.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RSS/Atom Feeds: Summary would be nice vharishankar LQ Suggestions & Feedback 1 11-13-2005 01:12 PM
NNTPS Newsreader and RSS/Atom feeds redhat beginer Linux - Software 3 04-24-2005 12:25 PM
Rss Atom powadha Linux - General 1 11-07-2004 07:19 PM
RSS and ATOM buttons? slackist LQ Suggestions & Feedback 4 07-25-2004 09:22 AM
Atom Feed added to LinuxQuestions.org jeremy LQ Suggestions & Feedback 3 07-10-2004 10:55 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration