[Python-bugs-list] [ python-Bugs-780300 ] pyexpat LexicalHandler swaps system_id and public_id
SourceForge.net
noreply@sourceforge.net
Wed, 30 Jul 2003 08:35:30 -0700
Bugs item #780300, was opened at 2003-07-30 15:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Open
Resolution: None
Priority: 5
Submitted By: Holger Floerke (floerke)
Assigned to: Nobody/Anonymous (nobody)
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=780300&group_id=5470