cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Josten <>
Subject Re: superfluous namespace declarations
Date Thu, 24 Nov 2005 16:57:22 GMT
I have encountered this problem on many locations (not only with Cocoon Transformers), but
there is 
a simple XSLT stylesheet that can fix this:

   <xsl:template match="comment()|processing-instruction()">
     <xsl:copy-of select="." />

   <xsl:template match="@*">
     <xsl:attribute name="{name()}" namespace="{namespace-uri()}">
       <xsl:value-of select="." />

   <xsl:template match="*">
     <xsl:element name="{name()}" namespace="{namespace-uri()}">
       <xsl:apply-templates select="@*|node()" />


Joerg Heinicke wrote:

> Juan Jose Pablos <cheche <at>> writes:
>>>Jörg Heinicke closed COCOON-1529:
>>>    Resolution: Invalid
>>Hey, I am a bit lost here with this bug, are you saying that from:
>><foo> to <foo  xmlns:i18n="" >
>>after a transformation is not a bug?
> Sorry, if it did not met your expectations. But yes, I don't see the above as a
> bug, but normal behaviour with XML. IIRC this behaviour results from SAX
> start/endPrefixMapping. Maybe the components consuming a specific namespace
> (like the i18n transformer) can stop propagating the events for their namespace?
> Is this possible? WDOT?
> Jörg

Drs. G.P.H. Josten

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199

De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is

uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

View raw message