[XML-SIG] validate and handle content at the same time.
Bill Eldridge
bill@rfa.org
Fri, 27 Dec 2002 11:34:05 -0500
My guess after looking at this for 30 seconds is that it's from
xml/sax/drivers2/drv_xmlproc.py I see:
def setFeature(self, name, state):
....
if name == saxlib.feature_validation:
self.__validate = state
if self.__validate:
self.__ext_pes = 1
...
and then under prepareParser:
if self.__ext_pes:
parser.set_read_external_subset(1)
which sets parser.read_external_subset=1
which in demo/xmlproc/xmlproc.py in
parse_doctype is seen as:
if self.read_external_subset:
p = self._setup_dtd_parser(0)
try:
sys_id = self.pubres.resolve_doctype_pubid(pub_id, sys_id)
p.dtd_start_calld = 1
p.parse_resource(join_sysids(self.get_current_sysid(),
sys_id))
finally:
p.deref()
self.err.set_locator(self)
if (pub_id == None and sys_id ==None) or \
not self.read_external_subset:
self.dtd.dtd_end()
[perhaps dtd_end() needs to called sometimes even
with read_external_subset set? Maybe something else?
Anyway, that's the end of my sleuthing this morning]
Remy C. Cool wrote:
>On Tuesday 24 December 2002 12:48, Uche Ogbuji wrote:
>
>
>>>Yep, I tried to find something in the code that coult be
>>>responsible for this behaviour, but to no avail. I suspect that
>>>it's in the way the parser is created or such. But I haven't
>>>enough experience with xml pasers (or the xmlproc parser)to spot
>>>it.
>>>
>>>
>>This one might require some attention from Lars. I don't remember
>>whether you filed a bug on sourceforge, but please do so if not. I
>>can try to see if the problem is in the xmlproc SAX driver rather
>>than the parser when I have a chance, and the bug report is my only
>>chance of remembering.
>>
>>
>
>I filed a bugreport this morning. Thanks for your help.
>
>Regards, Remy Cool
>
>_______________________________________________
>XML-SIG maillist - XML-SIG@python.org
>http://mail.python.org/mailman/listinfo/xml-sig
>
>