1.1 --- a/libxml2dom/__init__.py Sun Aug 31 01:31:31 2008 +0200
1.2 +++ b/libxml2dom/__init__.py Sun Aug 31 02:36:03 2008 +0200
1.3 @@ -616,15 +616,17 @@
1.4 Validate the document against the given schema document, 'doc'.
1.5 """
1.6
1.7 + validation_ns = doc.documentElement.namespaceURI
1.8 +
1.9 if hasattr(doc, "as_native_node"):
1.10 - _schema = Document_schema(doc.as_native_node())
1.11 + _schema = Document_schema(doc.as_native_node(), validation_ns)
1.12 else:
1.13 - _schema = Document_schemaFromString(doc.toString())
1.14 + _schema = Document_schemaFromString(doc.toString(), validation_ns)
1.15 try:
1.16 self.error_handler.reset()
1.17 - return Document_validate(_schema, self._node, self.error_handler)
1.18 + return Document_validate(_schema, self._node, self.error_handler, validation_ns)
1.19 finally:
1.20 - Schema_free(_schema)
1.21 + Schema_free(_schema, validation_ns)
1.22
1.23 # DOM Level 3 Validation methods.
1.24