by default, the xmlns: definition is repeated on every element.
if you do want the prefix, but dont want the xmlns: declaration repeated, set the namespace to null. dont forget to declare the namespace prefix somewhere higher in your document, though:
<?php
$w->startElementNS('foo', 'bar', 'http://example.com/foo');
$w->startElementNS('foo', 'baz', null);
$w->endElement();
$w->endElement();
?>