Unico Hommes wrote:
> 
> > > I think that DOMStreamer should only output such a declaration if
> > > the Node to stream is of type Document. Reasonable?
> > >
> > Yes, this is right, so actually you found a bug. Can you enter this
> > as a bug in bugzilla, please.
> 
> Done.
> 
Thanks!

> > > Anyway, I fixed the problem by setting
> > > DOMStreamer.setNormalizeNamespacesOn( false ). Perhaps this
> > > should also be the default setting, as "This class
> > > [NamespaceNormalizingDOMStreamer] has of course more overhead
> > > then the normal DOM-streamer, so only use it in cases where it's
> > > needed" (quoted from the NamespaceNormalizingDOMStreamer javadoc).
> > >
> > Yes, but it's much safer to have the NamespaceNormalizingDOMStreamer
> > as default because of some severe bugs in Xalan; if you have
> namespaces
> > in your dom, it's safer to use the NamespaceNormalizingDOMStreamer.
> 
> Could you expand on this, what could happen? I've been using DOMStreamer
> some time now in situations that heavily use xml name spacing and
> haven't experienced any problems.
> 
In some cases, when streaming dom nodes with namespaces, the namespace
definitions were not streamed correctly, e.g.
<a xmlns:b="yzz">
 <b:c/>
</a>

So, if you stream just the node b:c, then the namespace definitoon for
namespace b was missing. And the NamespaceNormalizingDOMStreamer actually
fixes this. 

Carsten

Reply via email to