cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: New DOMStreamer not backwards compatible
Date Wed, 05 Mar 2003 14:44:59 GMT
Unico Hommes wrote:
> 
> The latest changes to DOMStreamer broke my code in several places 
> due to the fact that the NamespaceNormalizingDOMStreamer is 
> outputting xml declarations during each stream( Node ) call, 
> resulting in xml declarations all over the place in my output. 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.

> 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.
As, in most cases you might not know if your DOM contains namespaces,
you have to use NamespaceNormalizingDOMStreamer anyway. That's why it
is the default. For performance reasons you can force to not use
the NamespaceNormalizingDOMStreamer.

Carsten

Mime
View raw message