[XML-SIG] [ pyxml-Bugs-595729 ] 4DOM/xmlproc catalog not working

noreply@sourceforge.net noreply@sourceforge.net
Thu, 15 Aug 2002 13:54:58 -0700


Bugs item #595729, was opened at 2002-08-16 06:54
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=595729&group_id=6473

Category: xmlproc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alastair Rankine (alastair)
Assigned to: Lars Marius Garshol (larsga)
Summary: 4DOM/xmlproc catalog not working

Initial Comment:
(PyXML 0.8, Python 2.2.1, on Windows)

The problem is that I'm trying to get catalog support, in order to validate a document whose DTD is specified by a public ID.

As per the docs I am using the xml.dom.ext.reader.Sax2 module:

doc = FromXmlFile(myFile, validate=1, catName="catalog")

Now as I understand it from reading the source, what this does is create a Sax2-compliant validating parser according to the parser factory, which by default is xmlproc with Sax2 wrapper (ie drv_xmlproc).

So it then looks to see that the catName parameter is set, and creates an SAX_catalog resolver to pass into the SAX2 parser. Now this looks fine, except that the SAX_catalog is not called by the underlying xmlproc parser when resolving entities during parsing (eg DTD public IDs).

The problem seems to be in drv_xmlproc.prepareParser - we really need to convert the existing SAX entity resolver into an xmlproc resolver. There is a FIXME here - but we actually need to fix xmlproc.catalog  by either merging SAX_catalog with xmlproc_catalog, or better still by allowing the construction of an xmlproc_catalog from a SAX-compliant entity parser.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=595729&group_id=6473