I wonder why D3.js doesn\'t add the namespace attributes to the SVG element.
d3.ns.prefix.ex = \'http://example.com/\';
var chart = d3.select(\'#chart\').app
namespace attributes are only relevant when documents are served as some XML mime type e.g. image/svg+xml.
namespaces don't do anything in html markup such as jsfiddle so d3 doesn't need to create them.
If you want namespaces then you could add the attributes manually in html or alternatively switch to xhtml where the attributes will be automatically created.