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>

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

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

Regards,
Geert

Joerg Heinicke wrote:

Juan Jose Pablos <cheche <at> apache.org> 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="http://apache.org/cocoon/i18n/2.1"; >

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
Consultant



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


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, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

Reply via email to