cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "solprovider (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-1529) I18nTranformer should consume and stop propagating start/endPrefixMapping of its namespace
Date Wed, 20 Feb 2008 18:55:43 GMT

    [ https://issues.apache.org/jira/browse/COCOON-1529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570795#action_12570795
] 

solprovider commented on COCOON-1529:
-------------------------------------

The i18n transformer requires users to add the transform to each pipeline.  In my experience,
the i18n transformer is always called just before a Serializer.  Resolving i18n tags should
happen in two situations:
1) Translation during serialization before leaving an XMAP.  Unresolved i18n elements must
remain for later processing.
2) Translation before presenting the information.  Unresolved i18n elements should translate
to the default and be removed.  The i18n namespace should be removed.

The first case can be integrated into the XMLSerializer.
The second case can be integrated into final Serializers such as the HTMLSerializer.
Since the XMLSerializer can be used in both situations, an "i18n-finalize" parameter can decide
if the defaults should be used and the i18n namespace be removed.  An "i18n-ignore" parameter
could be used for when performance matters and the i18n functionality is not useful, but new
users would benefit from the reduced code of the default functionality.

Each Serializer can have "i18n-catalog" parameters.  These catalog parameter could be made
unnecessary by having a default catalog name related to the sitemap, e.g. sitemap.xmap defaults
to using sitemap_i18n_xx.xml and sitemap_i18n.xml from the same directory.
 
Some people may argue against mixing Transformer functionality into Serializers.  Serialization
is a transformation possibly resulting in a non-XML data format.  I18n functionality is ubiquitous
and a major benefit of Cocoon.  Integrating i18n into Serializers removes the need for building
a comprehensive catalog for use in the final step before the final transformation/serialization;
each XMAP handles its unique i18n translations and leaves unknown translations for later processing.

This suggestion does not expect the removal of the i18nTransformer.  Allowing the i18nTransformer
to be called without serialization may prove useful and is necessary for backwards-compatibility.

As a non-integrated Transformer, the i18nTransformer should distinguish between interim transforms
that translate only elements from the current catalogs and final transforms that resolve every
i18n element/attribute and remove the i18n namespace.

> I18nTranformer should consume and stop propagating start/endPrefixMapping of its namespace
> ------------------------------------------------------------------------------------------
>
>                 Key: COCOON-1529
>                 URL: https://issues.apache.org/jira/browse/COCOON-1529
>             Project: Cocoon
>          Issue Type: Bug
>          Components: - Components: Sitemap
>    Affects Versions: 2.1.8, 2.1.9, 2.2-dev (Current SVN)
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Juan Jose Pablos
>            Priority: Minor
>         Attachments: I18nTransformer.java.diff
>
>
> This is a strage bug.
> on http://localhost:8888/samples/i18n/simple.xml around line 183:
>   <annotation xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
> This produces wrong xml output (extra xmlns:i18n attribute).
> now if you commented out the annotation element then the xmlns:i18n attribute
> goes to the next element:
>  <content xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
> It looks like it goes to the parent element always.
> I wish that I could have more information about how to resolve this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message