[Xml-logilab] vcalsax not fully vCal compliant

Anders Bruun Olsen anders@bruun-olsen.net
Fri, 20 Sep 2002 18:26:26 +0200


Hi,

I am considering using vcalsax to implement a backend for a
calendarprogram I am writing in Python but have run into a small problem
with vcalsax.

I chokes on multiline DESCRIPTION properties.
An example:

DESCRIPTION;QUOTED-PRINTABLE:This is a =0A=
multiline =0A=
description!

This causes the following response:

>>> test = load_vcal_to_dom("vcalout.vcs")
Warning : bad format
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/logilab/vcalsax/vcalsax.py", line 187, in load_vcal_to_dom
    return reader.fromUri(uri)
  File "/usr/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/__init__.py", line 70, in fromUri
    return self.fromStream(stream, ownerDoc)
  File "/usr/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 372, in fromStream
    self.parser.parse(s)
  File "/usr/lib/python2.2/site-packages/logilab/vcalsax/vcalsax.py", line 97, in parse
    qnames[(EMPTY_NAMESPACE,paramname)] = paramname
UnboundLocalError: local variable 'paramname' referenced before assignment

I have looked at the vcalsax source but I am not much of a regexp
wizard, so I have not been able to devise a solution.

Anybody else up for giving it a go?

-- 
Anders
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GO d--@ s:+ a-- C++ $UL++ P++ L+++ E- W+ N(+) o K? w !O M-- V
PS+ PE@ Y+ PGP+ t 5 X R+ tv+ b+ DI+++ D+ G e- h !r y?
------END GEEK CODE BLOCK------
PGPKey: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8BFECB41