Bugs item #1698944, was opened at 2007-04-12 07:44
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1698944&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
>Group: 3rd Party
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: L. Peter Deutsch (lpd)
Assigned to: Nobody/Anonymous (nobody)
Summary: dtdparser discards last line
Initial Comment:
The DTD parser in xml.parsers.xmlproc.dtdparser sometimes simply ignores the
last line of the input file. Here is the Python program I used to test it:
------begin
from xml.parsers.xmlproc.dtdparser import DTDParser,\
DTDConsumer, DTDConsumerPE
import tracer
def parse_dtd(dtd):
parser = DTDParser()
handler = DTDConsumerPE()
parser.set_dtd_consumer(handler)
parser.feed(dtd)
tracer.trace(DTDConsumer)
parse_dtd('''\
<!ENTITY % score PUBLIC
"-//Recordare//ELEMENTS MusicXML 1.1 Score//EN"
"t.dtd">
%score;
''')
------end
where the file t.dtd contained:
------begin
<!ELEMENT opus EMPTY>
------end
The tracer package (my own code) indicated that the opus element was never
parsed. The same was true if I added a blank line after the %score; entity
reference. However, if I added *two* blank lines after the entity reference,
the element declaration *was* processed.
I would note that while the bug exists in the original xmlproc package (at
least in xmlproc 0.70, downloadable from
http://www.garshol.priv.no/download/software/xmlproc/), the bug does *not*
exist in the PyXML package (downloadable from
http://sourceforge.net/projects/pyxml).
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2007-04-14 21:08
Message:
Logged In: YES
user_id=21627
Originator: NO
xmlproc is not part of the Python release; instead, it is part of PyXML.
Closing this report as third-party.
Alas, PyXML is not maintained anymore, so bugs in xmlproc are unlikely to
get fixed.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1698944&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com