diff options
author | Mike Hommey <glandium@debian.org> | 2005-04-04 18:23:13 +0000 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2005-04-04 18:23:13 +0000 |
commit | 0fc063df3ab2ad380d532d210dd1001de473e51b (patch) | |
tree | 6f88f0a0f845dd6aec7807b18cb5618d93e159ac /python/libxml.py | |
parent | 50e5b428562964b1eb2f876370058b34b47c5e90 (diff) | |
download | libxml2-0fc063df3ab2ad380d532d210dd1001de473e51b.tar.gz |
Load /tmp/tmp.98zkCi/libxml2-2.6.19 intoupstream/2.6.19
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'python/libxml.py')
-rw-r--r-- | python/libxml.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/python/libxml.py b/python/libxml.py index bde8aba..2eca71e 100644 --- a/python/libxml.py +++ b/python/libxml.py @@ -587,6 +587,45 @@ class parserCtxtCore: return libxml2mod.addLocalCatalog(self._o, uri) +class ValidCtxtCore: + + def __init__(self, *args, **kw): + pass + + def setValidityErrorHandler(self, err_func, warn_func, arg=None): + """ + Register error and warning handlers for DTD validation. + These will be called back as f(msg,arg) + """ + libxml2mod.xmlSetValidErrors(self._o, err_func, warn_func, arg) + + +class SchemaValidCtxtCore: + + def __init__(self, *args, **kw): + pass + + def setValidityErrorHandler(self, err_func, warn_func, arg=None): + """ + Register error and warning handlers for Schema validation. + These will be called back as f(msg,arg) + """ + libxml2mod.xmlSchemaSetValidErrors(self._o, err_func, warn_func, arg) + + +class relaxNgValidCtxtCore: + + def __init__(self, *args, **kw): + pass + + def setValidityErrorHandler(self, err_func, warn_func, arg=None): + """ + Register error and warning handlers for RelaxNG validation. + These will be called back as f(msg,arg) + """ + libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg) + + def _xmlTextReaderErrorFunc((f,arg),msg,severity,locator): """Intermediate callback to wrap the locator""" return f(arg,msg,severity,xmlTextReaderLocator(locator)) |