Can Dday check if the incomming stream is in valid iCalendar format?
So is there some sort of built in checking in Dday iCalendar that checks the input stream of what they are uploading is a valid iCalendar format. I am not sure what happens 开发者_如何学运维if something is not in proper format or if it is like a jpg being uploaded instead but has an Ical extension.
Doug Day, the author of DDay.iCal, has now made a standalone validator available:
http://icalvalid.cloudapp.net
It is a work in progress, modeled on the Mark Pilgrim and Sam Ruby RSS/Atom validator (feedvalidator.org).
If you use Doug's validator, let him know how it goes for you. He is eager for feedback.
AFAIK, Dday iCalendar is at best, particular about validating the data that it parses. It would seem that there is some ambiguity in the iCalendar spec itself, which causes implementations of parsers to treat the same iCalendar feed/data differently.
Jon Udell (a proponent of structured data feeds, especially iCalendar feeds) documents this in a few places:
Feed validation revisited: The parallel universe of iCalendar feeds
iCalendar validation issues #1 and #2: blank lines, PRODID and VERSION
He uses Dday iCalendar a bit as well, so I would look to his blog for information.
There are also some online calendar validation sites, which might be able to be called through an API (if you can spare the overhead). While I agree this is not optimal, if you have a need to validate incoming data, this might be your best (and only) route (depending on your needs).
I'm currently working on a newer version of DDay.iCal that will have some rudimentary/basic validation built into the framework. I'll try to add a comment when this upcoming version becomes available, but it should be within a couple of weeks.
Thanks! -Doug Day
精彩评论