Code should call setPrefix for all new Namespaces prior to starting an Element. Otherwise if the receiving code is not configured for repairing namespaces it may not have the correct Namespaces available (and will not automatically generate them)
Issue #106 - setPrefix call before startElement.
Fixes #106 - setPrefix call before startElement.
Issue #106 - This is a more correct fix.
StAX is a *poor* specification, and the default implementations of StAX are broken too.