472,370 Members | 2,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,370 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 1896
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
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.