473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

can't get my RSS to validate - Help!!

I'm running this page:

http://www.krubner.com/rss/page938.xml
through this validator:

http://rss.scripting.com/?url=http%3...%2Fpage938.xml
I can't get this page to validate. I'm getting two errors:

1. pubDate must be an RFC-822 date 9 9
2. Undefined rss element: item 12 7

The second one makes no sense to me. "item" is used in all the
examples they give for .91 RSS, so why is the validator giving me
grief?
Jul 20 '05 #1
9 1951
lawrence wrote:
I'm running this page:

http://www.krubner.com/rss/page938.xml
through this validator:

http://rss.scripting.com/?url=http%3...bner.com%2Frss 2Fpage938.xml

I can't get this page to validate. I'm getting two errors:

1. pubDate must be an RFC-822 date 9 9
2. Undefined rss element: item 12 7

The second one makes no sense to me. "item" is used in all the
examples they give for .91 RSS, so why is the validator giving me
grief?


I don't know rss, but your items are direct children of rss, and
according to the dtd, the only valid child element for rss is channel
and the only valid parent element for item is also channel.

Jul 20 '05 #2
lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>...
I'm running this page:

http://www.krubner.com/rss/page938.xml

through this validator:

http://rss.scripting.com/?url=http%3...%2Fpage938.xml
I'd believe George Bush before I trusted the accuracy of a validator
from scripting.com -- and for similar reasons; both are always "right"
(i.e. not obvious enough to clearly catch them at it) but they'll
cheerfully redefine black as white to push their own agendas.

I can't get this page to validate. I'm getting two errors:

1. pubDate must be an RFC-822 date 9 9
Your <pubDate> has no content. The whole element is optional, but if
you're going to use it, you have to give it some content.
2. Undefined rss element: item 12 7


You need to have <item> as a child of <channel>. This 0.91 feed has it
as a child of <rss> (which is where RSS 1.0 places it, so that might
have caused some confusion)

I wouldn't suggest 0.91 either, as a format for new work. 1.0 is best
(a hobby horse of mine), but go to 0.92 as a minimum.
Jul 20 '05 #3
lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>...
I'm running this page:

http://www.krubner.com/rss/page938.xml
through this validator:

http://rss.scripting.com/?url=http%3...%2Fpage938.xml
I can't get this page to validate. I'm getting two errors:

1. pubDate must be an RFC-822 date 9 9
2. Undefined rss element: item 12 7

The second one makes no sense to me. "item" is used in all the
examples they give for .91 RSS, so why is the validator giving me
grief?

Thanks very much. I rearranged things and got it to validate, using
the validator from scripting.com.

However, it still fails validation at
http://feeds.archive.org/validator/

The problem is "bad characters". I'm not sure how to start to debug
that. What is the first thing I should look for?

I wrote the 0.91 script (a PHP script) first because I assumed it
would be easy. I figured once I worked out the troubles at 0.91, I
could move up and do scripts for 1.0 and 2.0. The fact that I'm having
trouble even at the 0.91 level makes me happy that I didn't jump
straight to the 1.0 or 2.0 level.
Jul 20 '05 #4
lawrence wrote:
I'm running this page:

http://www.krubner.com/rss/page938.xml

However, it still fails validation at
http://feeds.archive.org/validator/

The problem is "bad characters". I'm not sure how to start to debug
that. What is the first thing I should look for?


Did you change anything? I get "This is a valid RSS feed." with <>
http://feeds.archive.org/validator/>.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #5
> However, it still fails validation at
http://feeds.archive.org/validator/
The version this morning seems OK. I suggest you keep an archive of
these bad feeds under static URLs, so that we can more easily see the
problems.
The problem is "bad characters". I'm not sure how to start to debug
that. What is the first thing I should look for?
Most likely thing is the use of HTML entities (like &eacute; ) that
aren't valid because RSS is an XML protocol and doesn't recognise
these HTML-defined entities. A _very_ common error in RSS feeds.

I wrote the 0.91 script (a PHP script) first because I assumed it
would be easy.


I have to ask why anyone needs to write RSS scripts these days ?
(Although I spent yesterday doing it myself). There are very many
already out there, and it's a rare situation that really needs
something written from scratch.

I suggest that you learn a bit more detailed XML (entities for one
thing, namespaces for another) and learn how to read a formal DTD.
It's one thing to make a feed work once during testing, but quite
another to make a reliable feed that handles all the data it will meet
over its lifetime. Sadly RSS tools suffer badly from this - they run
for a week, then crash when they meet their first accented European
character. To get a reliable feed, you really do need to know how to
_understand_ the specification, not just match up one example.

As to the versions, then I'd support 0.92 and 1.0 1.0 is best, 0.92
solves compatibility issues for some older or simpler aggregators. 2.0
is pointless.

You don't need to understand Dublin Core to use RSS 1.0, but you will
do if you want to really use it. Worth the effort of studying it
anyway (Learning Dublin Core is vastly more useful than learning RSS
anyway)

Hang in there - RSS versions don't really vary that much between
themselves.
Jul 20 '05 #6
di*****@codesmiths.com (Andy Dingley) wrote in message news:<28**************************@posting.google. com>...
However, it still fails validation at
http://feeds.archive.org/validator/


The version this morning seems OK. I suggest you keep an archive of
these bad feeds under static URLs, so that we can more easily see the
problems.
The problem is "bad characters". I'm not sure how to start to debug
that. What is the first thing I should look for?


Most likely thing is the use of HTML entities (like &eacute; ) that
aren't valid because RSS is an XML protocol and doesn't recognise
these HTML-defined entities. A _very_ common error in RSS feeds.


I'm stumped when I think of all the possible user inputs that can mess
up an RSS feed. Myself and a friend have been working on some weblog
software for a year now - the weblog entries show up in the RSS feed.
Lots and lots of problems come up - people might copy and paste
something from Word in their weblog and then get a Windows character
that is not in the defined char set for the RSS feed. How to protect
against that. Or people can, as you say, add in some HTML entities, or
sometimes the software does that automatically.

It's true that I could write filters for each possible problem as it
comes up, but it seems like it would take a mountain of code and there
would never be an end to it - after I figure out how to convert
unexpected European accented characters, then I'd have all the Asian
alphabets to work on.

I guess I'm asking if there is an easy, elegant way to convert a set
of characters to some particular character set. I don't know of any
myself. What strategies have other programmers used when tackling this
problem?
Jul 20 '05 #7
di*****@codesmiths.com (Andy Dingley) wrote in message >
I have to ask why anyone needs to write RSS scripts these days ?
(Although I spent yesterday doing it myself). There are very many
already out there, and it's a rare situation that really needs
something written from scratch.
I think that is a fair question. Part of the answer would be, I guess,
we want to be able to assert that our weblog software is "complete" in
some sense. Without RSS, it is not complete. The other aspect of it,
call it an institutional mission, is that we want to donate all our
code to the public domain. That means we often have to do things from
scratch, because other we might use is copyrighted. There is a lot of
good code under the GPL, but the GPL is too restrictive for our
purposes.

I suggest that you learn a bit more detailed XML (entities for one
thing, namespaces for another) and learn how to read a formal DTD.
It's one thing to make a feed work once during testing, but quite
another to make a reliable feed that handles all the data it will meet
over its lifetime.


I really would love to learn more about XML and I've bought a bunch
books from O'Reilly. Sadly, I'm stretched a little thin. Me and some
friends have been working on a content management system and I've had
to learn a lot about a lot of different stuff, and I haven't had the
chance to become very good at anything. I'd like to know more about
XML, XHTML, Apache, CSS 2.0, RSS, Linux, Windows XP, mime types,
character encodings, SOAP, Java, web services, Flash, PostGreSql,
Swing, MySql, encryption and a whole lot more. It's all just too much.
My hope, at this point, is they'll come a point when the basic
abilities of our CMS are stable enough that I can go over it again and
go deeper into certain areas when my knowledge is better. That, or
maybe our project can pick up some programmers who are more talented
than I.

We're giving away our (still quite buggy) software here:

http://www.publicdomainsoftware.org/
Jul 20 '05 #8
lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>...
I'm stumped when I think of all the possible user inputs that can mess
up an RSS feed.
Can't be done. Never was possible - users are just too inventive.

Instead, look at it the other way. Find the set of all things that are
_valid_ RSS and exclude anything else. This is a smaller set than the
invalid stuff, and it's better documented. If you _only_ allow the
valid sequences, then you have implicitly forbidden all the invalid
stuff.

Definitely read this
http://diveintomark.org/archives/200...compatible-rss

It's true that I could write filters for each possible problem as it
comes up,


No, you can't. You might possibly manage to do it for one day, but
there will always be something new coming along tomorrow. Take it the
other way.
Jul 20 '05 #9
di*****@codesmiths.com (Andy Dingley) wrote in message news:<28**************************@posting.google. com>...
lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>...
I'm stumped when I think of all the possible user inputs that can mess
up an RSS feed.


Can't be done. Never was possible - users are just too inventive.

Instead, look at it the other way. Find the set of all things that are
_valid_ RSS and exclude anything else. This is a smaller set than the
invalid stuff, and it's better documented. If you _only_ allow the
valid sequences, then you have implicitly forbidden all the invalid
stuff.

Definitely read this
http://diveintomark.org/archives/200...compatible-rss


Thanks for the link to the Mark Pilgrim article. Despite the obvious
anti-Dave Winer bias in the article, I thought it was very good and
very informative.

I like your suggested style for moving forward but don't understand
how to do it. Should I take an input (when a user posts) and take
every character and put it into an array and then test it against an
array full of those character's that are allowed? That seems
cumbersome, though it only happens when the user inputs stuff, so
being cumbersome at that point isn't lethal. But is there a more
graceful way to validate the input?
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pato Secruza | last post by:
Hi everyone! I have a really frustrating error and need help. I’m trying to do a function that gets the properties and names of the fields in a MS Access database using ASP. I haven’t...
0
by: Shaggyh | last post by:
hi im needing help with a program im writing to do subnetting i was on before about it and i got some help. the code below wont work for me and i cant think of why not. i was wondering if anyone...
9
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see)...
8
by: greg.gottfried | last post by:
I am very new to java script. I am wanting to validate a form and I cant seem to get one validation to work. The first two work, but the thrid I want to have a max length of 30 and I cant ssem to...
2
by: pyropyro78 | last post by:
hey i know this is asking alot but i cant figure out how to get my site to validate if any1 here has some spare time after reading this post please tweek my html or something in a word and tell me...
1
by: vbnewb | last post by:
Hey All, I am new to the forums. Have been reading a bit here on some very useful tips and tutorials here. I am familiar with the basics of Access (tables , queries, forms,) but am such a newb at...
11
by: shror | last post by:
Hi every body, Please I need your help solving my php mail() function problem that the code is appearing in the view source and I dont know whats the problem where I am using another page tto test...
2
by: Andy B | last post by:
I have a detailsView (replaced the formview with it) thinking it would help me fix my control access in a formview problem. Well, I don't think .net knows how to count. Here is what I have: I am...
2
by: embz | last post by:
this post concerns three pages. 1. this page: http://www.katherine-designs.com/sendemail.php i get the following errors: a lot of it seems to deal with the PHP code i inserted to the page....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.