[XML-SIG] setFeature(feature_validation, 1) causes misfire on endElement()

Remy C. Cool dev-xml@smartology.nl
Fri, 6 Dec 2002 13:43:18 +0100

I don't know if this 'problem' is known, but when experimenting with 
the xmlproc parser I stumbled upon the following problem:


      # create a parser
      parser = make_parser('xml.sax.drivers2.drv_xmlproc')
      # tell the parser we are not interested in XML namespaces
      parser.setFeature(feature_namespaces, 0)
      # tell the parser we want dtd validation
      parser.setFeature(feature_validation, 1)
      # create the handler
      pdf = xpdf_parser()
      # tell the parser to use our handler
      # Parse the input

When feature_validation is set to true ... the endElement handler does 
not work. When feature_validation is set to false, endElement works 
and validation is still enabled.

An other problem (not related) is that the locator function: 

def setDocumentLocator(self, locator):
      self.locator = locator 

doesn't work ... how do I get/reference the locator object inside my 
parser so that I can use the getLineNumber, getColumnNumber functions 

Kind Regards,