[XML-SIG] Minidom bugs/questions

Uche Ogbuji uche.ogbuji@fourthought.com
Mon, 05 Feb 2001 22:29:13 -0700


> > The code in startDocument() looks like it would insert two document
> > elements if self._locator is set and its getPublicId() returns a
> > non-null qualified name.  I don't know how to fix that, or how
> > common this is.
> 
> I think this code was completely bogus. The author apparently thought
> of creating DocumentTypes, in which case publicId and systemId would
> be required. However, the SAX locator does not provide that
> information (atleast not for the DTD; rather for the document itself),
> nor were we in the process of creating document types. 
> 
> It seems that the processing of the doctype argument is also
> incorrect: It should *not* create one given the qualifiedName, atleast
> I can't find any indication that it should. It MUST set the
> ownerDocument, though, which it doesn't. I'm not sure whether the
> doctype needs to appear in the childNodes of the Document, can anybody
> clarify this?

Yes.  The doctype is a child of the Document, along with any comments and PIs 
in the prolog.  This is the main reason for having a documentElement() method.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python