cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject [vote] Removing namespace-prefixes feature on parsers
Date Thu, 20 Dec 2001 17:05:23 GMT
Hi team,

The default behaviour of a SAX parser when encountering an xmlns:xxx
namespace declaration is to call ContentHandler.startPrefixMapping(),
and to remove this attribute from the Attributes object passed to
startElemnt().

But Cocoon code also sets the "namespace-prefixes" feature each time it
creates a Parser. This has the effect of also passing xmlns:xxx in the
Attributes (see ContentHandler.startElement() javadocs for more
details).

What is the reason for enabling this feature ? I guess this was a try to
circumvent a long-standing (still present) bug in Xalan's serializer
which doesn't output properly namespace declarations if they're not
present as attributes in the incoming SAX stream. However, this wasn't
the solution and I patched several months ago AbstractTextSerializer to
make Xalan happy.

Now I'm using Saxon for some parts of our apps and this one barks on
each and every xmlns:xxx attribute it encounters when reading
stylesheets. So I locally removed the namespace-prefixes feature : this
fixes Saxon problems and doesn't hurt Xalan (it needs them only for
proper serialization).

So, team, what about not enabling the "namespace-prefix" feature and
thus keep the default behaviour of SAX parsers ?

+1 from me.

Sylvain.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message