You must omit the xmlns
alias when adding the child, and provide the full xmlns
in the 3rd parameter (not the alias):
$make->addChild('model', 'foo', 'http://base.google.com/ns/1.0');
You can use a technique like this to simplify / DRY up management of the namespaces
Re: What does <g:model xmlns:g="g">foo</model>
do?
This overrides the previous definition of the g
alias (and corrupts it in your case to g
)