[XML-SIG] xmlproc DTD api bug

Alexandre Fayolle Alexandre.Fayolle@logilab.fr
Tue, 24 Oct 2000 17:54:00 +0200 (CEST)

I'm using PyXml on python 1.5.2 I know these are old versions (we
are planning to move further real soon now), so maybe the problem has
already been fixed. Please excuse me if this is the case.

If I have an element with an ANY content model, and use
elt.get_valid_elements(elt.get_start_state()), I get a Type Error,
because the content model is None for this element:
  File "/usr/lib/python1.5/site-packages/xml/parsers/xmlproc/xmldtd.py",
line 300, in get_valid_elements
    return self.content_model[state].keys()
TypeError: unsubscriptable object

I think xmlproc should test for this case, and return the list of all the
elements known in the DTD (using dtd.get_elements())


Alexandre Fayolle
LOGILAB, Paris (France).