Displaying 1 result from an estimated 1 matches for "handle_dtd_errors".
2010 Oct 08
7
[PATCH] Replace pyxml/xmlproc-based XML validator with lxml based one.
...file?
+            # --sp
+            warnings.warn(''DTD file %s not found.'' % (self.dtd),
+                          UserWarning)
+            return
+        
+        tree = etree.parse(file)
+        root = tree.getroot()
+        if not dtd.validate(root):
+            self.handle_dtd_errors(dtd)
+            
     def check_dom_against_dtd(self, dom):
         """
         Check DOM again DTD.
         Doesn''t give as nice error messages.
         (no location info)
         """
-        dtd = xmldtd.load_dtd(self.dtd)
-        app = xmlval.Valid...