          valid_ctxt = xmlschema.xmlSchemaNewValidCtxt(self._c_schema)
          ret = xmlschema.xmlSchemaValidateDoc(valid_ctxt, doc._c_doc)
          xmlschema.xmlSchemaFreeValidCtxt(valid_ctxt)
-@@ -1643,7 +1861,164 @@
+@@ -1643,7 +1862,164 @@
  cdef Parser theParser
  theParser = Parser()
  

 
 cdef _addNamespaces(xmlDoc* c_doc, xmlNode* c_node, object nsmap):
     cdef xmlNs* c_ns
@@ -1097,22 +1178,113 @@
             else:
                 tree.xmlNewNs(c_node, href, NULL)
         

         
     def set(self, key, value):
         self.attrib[key] = value
@@ -569,7 +596,7 @@
                 result.append(_elementFactory(self._doc, c_node))
                 c = c + 1
             c_node = c_node.next
