devtools/htmlparser.py
changeset 8938 198fdadafed6
parent 8937 8a1809c9a043
child 8939 30ce8eccfe3f
--- a/devtools/htmlparser.py	Thu Apr 25 17:46:28 2013 +0200
+++ b/devtools/htmlparser.py	Thu Apr 25 18:38:47 2013 +0200
@@ -22,7 +22,7 @@
 
 from lxml import etree
 
-from logilab.common.deprecation import class_deprecated
+from logilab.common.deprecation import class_deprecated, class_renamed
 
 from cubicweb.view import STRICT_DOCTYPE, TRANSITIONAL_DOCTYPE
 
@@ -79,12 +79,18 @@
             STRICT_DOCTYPE, data)
 
 
-class SaxOnlyValidator(Validator):
+class XMLValidator(Validator):
+    """ A fully compliant XML parser """
 
     def __init__(self):
         Validator.__init__(self)
         self.parser = etree.XMLParser()
 
+SaxOnlyValidator = class_renamed('SaxOnlyValidator',
+                                 XMLValidator,
+                                 '[3.17] you should use the '
+                                 'XMLValidator class instead')
+
 
 class XMLDemotingValidator(SaxOnlyValidator):
     """ some views produce html instead of xhtml, using demote_to_html