[icalendar-dev] General thoughts on strictness

Max M maxm at mxm.dk
Tue May 2 18:21:16 CEST 2006


Gregg Irwin wrote:

>Hello again,
>
>I haven't hit the archives here yet, but is there a general feeling
>about how strict people are when it comes to the spec or formatting?
>  
>

I tried to follow Postel's Prescription: Be generous in what you accept, 
rigorous in what you emit

>e.g. the %multiple.ics example file is oddly formatted (I thought
>blank lines were not conformant as well).
>

Completely blanks lines are not, but you can do some tricks like having 
lines with only a single space and a \r\n.

This will look like three blank lines: '\r\n \r\n \r\n ' but is just 
legal line folding.

Isn't that what you are seing? I didn't write the multiple calendar 
stuff, so I am not absolutely shure about it.

>I've also found a number of
>other test files that break rules here and there, which makes writing
>a parser based on the RFC spec a bit of a chore, since you don't know
>who is at fault when things fail (the ABNF spec has glitches too).
>  
>

The glorious life of a standards developer ;-)

>Are there any "reference" feeds that people use to test their parsers?
>e.g. it seems that Apple's iCal, PHP iCalendar, and the new Google
>calendar would be top targets for compatibility.
>  
>


You should just find whatever files you can find. Whenever you find an 
error, test if you are following the spec. If you are, you just tell the 
producer they have a bug. Then decide if you can make your parser more 
accepting, or if you should make a workaround, if the producer is 
important enough.

-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96




More information about the icalendar-dev mailing list