[
https://issues.apache.org/jira/browse/COCOON-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584774#action_12584774
]
Andreas Hartmann commented on COCOON-2191:
------------------------------------------
As a workaround it is sufficient to add an identity XSLT transformation after
the i18n transformation. I guess this rids the SAX stream of the prefix
mappings.
> XML namespace declaration added in certain circumstances
> --------------------------------------------------------
>
> Key: COCOON-2191
> URL: https://issues.apache.org/jira/browse/COCOON-2191
> Project: Cocoon
> Issue Type: Bug
> Components: Blocks: Serializers
> Affects Versions: 2.1.12-dev (Current SVN)
> Reporter: Andreas Hartmann
>
> Pipeline:
> <map:generate src="test.xml"/>
> <map:transform type="i18n"/>
> <map:serialize type="xml"/>
> Source document (test.xml):
> <?xml version="1.0" encoding="UTF-8"?>
> <document>
> <i18n:text
> xmlns:i18n="http://apache.org/cocoon/i18n/2.1">foo</i18n:text>
> <element/>
> </document>
> Output of XMLSerializer:
> <?xml version="1.0" encoding="UTF-8"?>
> <document>
> foo
> <element xmlns:xml="http://www.w3.org/XML/1998/namespace"/>
> </document>
> The xmlns:xml declaration is added due to an underflow of the Namespaces
> stack. The field Namespaces.last becomes 1 and therefore the xml namespace is
> committed (which I guess should never happen). I'm not sure yet if this is a
> problem of the serializers block or maybe of the I18nTransformer.
> The problem is that this happens when generating RSS feeds, and IE doesn't
> accept them if they contain namespace declarations.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.