W3C home > Mailing lists > Public > www-rdf-calendar@w3.org > January 2004

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

From: olivier Thereaux <ot@zoy.org>
Date: Tue, 20 Jan 2004 12:02:21 +0900
Message-Id: <106A632C-4AF5-11D8-A58D-000A95E54002@zoy.org>
Cc: Libby Miller <Libby.Miller@bristol.ac.uk>
To: www-rdf-calendar@w3.org


On Jan 19, 2004, at 6:14, Libby Miller wrote:
> 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 am yet to familiarize with the code, but I think I found a way to do 
that without opening the file twice...

If I am not mistaken you take all the output in a string and output it 
all once the whole file has been parsed. (cf sub printstr{} line 602). 
It means you could as well parse the whole file, and save the PRODID 
when it appears.
Then at the EOF make the necessary subtitutions (you may have to use a 
"dummy" prodid during the parsing) in the output string.

I suppose that would be faster if the ics file is really big. If you 
want (and time permitting) I can send you a patch.

-- 
olivier
Received on Monday, 19 January 2004 22:02:26 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.30 : Friday, 25 March 2005 11:20:43 GMT