original_string: protected function namespaceAttrs($ele) {
          if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument) {
              $this->xpath = new \DOMXPath($ele->ownerDocument);
          }
  
          foreach ($this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele) as $nsNode) {
              if (!in_array($nsNode->nodeValue, $this->implicitNamespaces)) {
                  $this->wr(' ')->wr($nsNode->nodeName)->wr('="')->wr($nsNode->nodeValue)->wr('"');
              }
          }
      }
code: protected function namespaceAttrs($ele) {
          if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument) {
              $this->xpath = new \DOMXPath($ele->ownerDocument);
          }
  
          foreach ($this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele) as $nsNode) {
              if (!in_array($nsNode->nodeValue, $this->implicitNamespaces)) {
                  $this->wr(' ')->wr($nsNode->nodeName)->wr('="')->wr($nsNode->nodeValue)->wr('"');
              }
          }
      }
code_tokens: protected function namespaceAttrs ( $ ele ) { if ( ! $ this -> xpath || $ this -> xpath -> document !== $ ele -> ownerDocument ) { $ this -> xpath = new \ DOMXPath ( $ ele -> ownerDocument ) ; } foreach ( $ this -> xpath -> query ( 'namespace::*[not(.=../../namespace::*)]' , $ ele ) as $ nsNode ) { if ( ! in_array ( $ nsNode -> nodeValue , $ this -> implicitNamespaces ) ) { $ this -> wr ( ' ' ) -> wr ( $ nsNode -> nodeName ) -> wr ( '="' ) -> wr ( $ nsNode -> nodeValue ) -> wr ( '"' ) ; } } }
docstring: Write the namespace attributes
  
  
  @param \DOMNode $ele
  The element being written.
docstring_tokens: Write the namespace attributes