original_string: final protected function isElementNameValid(string $name): bool
      {
          return $name &&
              false === strpos($name, ' ') &&
              preg_match('#^[\pL_][\pL0-9._:-]*$#ui', $name);
      }
code: final protected function isElementNameValid(string $name): bool
      {
          return $name &&
              false === strpos($name, ' ') &&
              preg_match('#^[\pL_][\pL0-9._:-]*$#ui', $name);
      }
code_tokens: final protected function isElementNameValid ( string $ name ) : bool { return $ name && false === strpos ( $ name , ' ' ) && preg_match ( '#^[\pL_][\pL0-9._:-]*$#ui' , $ name ) ; }
docstring: Checks the name is a valid xml element name.
docstring_tokens: Checks the name is a valid xml element name .