code: def valid_qname(val):
      
  
      try:
          (prefix, localpart) = val.split(":")
          return valid_ncname(prefix) and valid_ncname(localpart)
      except ValueError:
          return valid_ncname(val)
docs: A qname is either
          NCName or
          NCName ':' NCName