[ python-Bugs-780300 ] pyexpat LexicalHandler swaps system_id and
public_id
SourceForge.net
noreply at sourceforge.net
Wed May 5 21:56:03 EDT 2004
Bugs item #780300, was opened at 2003-07-30 17:35
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=780300&group_id=5470
Category: XML
Group: Python 2.2.3
>Status: Closed
>Resolution: Fixed
Priority: 7
Submitted By: Holger Floerke (floerke)
Assigned to: Martin v. Löwis (loewis)
Summary: pyexpat LexicalHandler swaps system_id and public_id
Initial Comment:
XML:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE A SYSTEM "a.dtd">
<A>test</A>
DTD: you can imagine
...
ch = MyHandler()
parser = make_parser()
parser.setProperty(handler.property_lexical_handler, ch)
...
class MyHandler(XMLGenerator):
...
def startDTD(self, name, public_id, system_id):
self._out.write(public_id)
...
-> "a.dtd" (but a.dtd should be the system_id) and the
system_id in method startDTD is None
a glimpse into pyexpat.c from python 2.2.3
...
VOID_HANDLER(StartDoctypeDecl,
...
STRING_CONV_FUNC,doctypeName,
STRING_CONV_FUNC,sysid,
STRING_CONV_FUNC,pubid,
has_internal_subset))
...
maybe sysid and pubid is swapped.
I'm not a python specialist and maybe this bug is fixed or
is not a bug. Please let me know...
HolgeR
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2004-05-06 03:56
Message:
Logged In: YES
user_id=21627
This has been fixed in expatreader.py 1.33. Backporting the
fix to 2.3 is not possible, since applications may rely on
the bug.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-08-01 09:10
Message:
Logged In: YES
user_id=21627
This is indeed a bug in Python 2.3, which has been fixed in
PyXML.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=780300&group_id=5470
More information about the Python-bugs-list
mailing list