protected function setAttribute(\DOMElement $node, $name, $value)
    {
        if ($this->rootNSWorkaround()) {
            $node->setAttribute($name, $value);
        } else {
            $node->setAttributeNS(self::NS, $name, $value);
        }

        return $node;
    }
protected function setAttribute(\DOMElement $node, $name, $value)
    {
        if ($this->rootNSWorkaround()) {
            $node->setAttribute($name, $value);
        } else {
            $node->setAttributeNS(self::NS, $name, $value);
        }

        return $node;
    }
protected function setAttribute ( \ DOMElement $ node , $ name , $ value ) { if ( $ this -> rootNSWorkaround ( ) ) { $ node -> setAttribute ( $ name , $ value ) ; } else { $ node -> setAttributeNS ( self :: NS , $ name , $ value ) ; } return $ node ; }
Set attribute workaround helper.

Work around method for the fact that DOMDocument adds some mysterious namespache "xmlns:default"
when the root NS is the requested XMLNS and setAttributeNS() is used.

@param \DOMElement $node  The node to which the attribute shall be written to.

@param string      $name  The name of the attribute.

@param string      $value The value for the attribute.

@return \DOMElement
Set attribute workaround helper .