Re: cal2rdf.pl > v1.13 does not like X-WR-CALNAME before PRODID

hi Olivier

I've done a quick fix for this, but my perl is very bad and I'm sure
others can suggest a better way of doing it - I open and close the file
twice.

I've added a test file:
http://www.w3.org/2002/12/cal/test/ISWC-related.ics

which had the properties olivier described (and also serves as test of
url and location.).

I've also updated ical2rdf.pl with respect to some fixes that Masahide
Kanzaki made for his online service [1]. At the moment I've removed the
cgi features but left in the Japanese text handling and multiple
vcalendar handling, and I've also added a test for the latter, kindly
donated by Davey[2].

http://www.w3.org/2002/12/cal/test/MozMulipleVcalendars.ics

cheers

Libby

[1] http://www.kanzaki.com/courier/ical2rdf
[2] http://www.ilrt.bris.ac.uk/discovery/chatlogs/rdfig/2004-01-06.html#T11-28-30

On Fri, 16 Jan 2004, olivier Thereaux wrote:

>
> Hi all,
>
> I have been recently playing [W3C hat off] with RDF Calendaring and
> found the ical2rdf perl script truly useful.
>
> As I have found, apparently the version of iCal I have (1.5.1) declares
> PRODID after the first X-* header (namely, X-WR-CALNAME)
>
> sample iCal file: [[
> > BEGIN:VCALENDAR
> > VERSION:2.0
> > X-WR-CALNAME:test
> > PRODID:-//Apple Computer\, Inc//iCal 1.5//EN
> ...
> ]]
>
> ical2rdf.pl version 1.13 and above added a mechanism relying on finding
> PRODID to generate the xproperty namespace, which is a useful
> user-friendly feature, and a good idea since PRODID is apparently
> required and thus *is* there somewhere in the iCal file... but since
> X-* properties may (and indeed, do) appear before PRODID is declared,
> it causes the script to die on (line 244):
>
>           die "X- property ($n) requires PRODID field";
>
> A quick scan through RFC 2445 ("4.8.8.1 Non-standard Properties") does
> not appear to make this behaviour illegal, so this appears to be a bug
> in ical2rdf.
> I don't have a miracle solution figured out yet. I suppose ical2rdf.pl
> could be modified to parse the ics twice, once in search of PRODID and
> then a normal parse.
>
> Cheers,
> --
> olivier
>
>
>

Received on Sunday, 18 January 2004 16:18:50 UTC