code: def check_attr(self, pos, attrs):
          
  
          for at in attrs:
              (ns, local_name) = self.split_qname(at)
              if ns is None:
                  error.err_add(self.ctx.errors, pos,
                                'UNEXPECTED_ATTRIBUTE', local_name)
              elif ns == yin_namespace:
                  error.err_add(self.ctx.errors, pos,
                                'UNEXPECTED_ATTRIBUTE', "{"+at)
docs: Check for unknown attributes.