code: def __applytns(self, root):
          
          TNS = "targetNamespace"
          tns = root.get(TNS)
          if tns is None:
              tns = self.schema.tns[1]
              root.set(TNS, tns)
          else:
              if self.schema.tns[1] != tns:
                  raise Exception, "%s mismatch" % TNS
docs: Make sure included schema has the same target namespace.