[XML-SIG] [Bug #125909] xml.dom.ext.Printer produces invalid or incomplete DTDs

noreply@sourceforge.net noreply@sourceforge.net
Fri, 15 Dec 2000 09:17:33 -0800


Bug #125909, was updated on 2000-Dec-15 09:17
Here is a current snapshot of the bug.

Project: Python/XML
Category: 4Suite
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: mjpieters
Assigned to : nobody
Summary: xml.dom.ext.Printer produces invalid or incomplete DTDs

Details: xml.dom.Printer.PrintVisitor.visitDocumentType will produce 
incorrect or incomplete XML in the following cases:

- There is no System ID defined, but there are entities or
  notations:

  The entitites and notations are not written out. The XML 
  spec says that a System ID isn't mandatory, DTDs with 
  <!DOCTYPE rootName [ <entities and notations> ]> is 
  perfectly valid.

- There is both a System ID and a Public ID defined:

  The Public and System ID are written out as:

     <!DOCTYPE PUBLIC "<public id>" SYSTEM "<system id>">

  The keyword 'SYSTEM' is illegal in this context, it 
  should read:

     <!DOCTYPE PUBLIC "<public id>" "<system id>">

- There is a double-quote character (") in either the 
  System ID or the Public ID:

  The Public or System ID in question will be written out 
  enclosed with double-quotes, while the XML spec provides 
  for enclosing the ID in single quotes (').

I'll submit a patch to the patch manager. 

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=125909&group_id=6473