You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Jeff Turner <je...@apache.org> on 2003/09/20 10:24:35 UTC
Declaring components where they are used (Re: cvs commit: xml-forrest/src/resources/stylesheets i18n.xsl)
On Tue, Sep 16, 2003 at 04:35:09PM -0000, cheche@apache.org wrote:
> cheche 2003/09/16 09:35:09
>
> Modified: . status.xml
> src/resources/conf cocoon.xconf menu.xmap sitemap.xmap
> src/resources/forrest-shbat forrest.build.xml
> Added: src/resources/fresh-site/src/documentation/translations
> menu_es.xml menu_it.xml
> src/resources/stylesheets i18n.xsl
> Log:
> First I18n integration for menus.
> PR: FOR-9
...
> 1.119 +15 -1 xml-forrest/src/resources/conf/sitemap.xmap
>
> Index: sitemap.xmap
> ===================================================================
> RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
> retrieving revision 1.118
> retrieving revision 1.119
> diff -u -r1.118 -r1.119
> --- sitemap.xmap 10 Sep 2003 20:21:45 -0000 1.118
> +++ sitemap.xmap 16 Sep 2003 16:35:08 -0000 1.119
> @@ -61,6 +61,16 @@
> </map:transformer>
>
> <map:transformer name="xinclude" src="org.apache.cocoon.transformation.XIncludeTransformer" logger="sitemap.transformer.xinclude" pool-grow="2" pool-max="16" pool-min="2" />
> +
> + <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
> + <catalogues default="menu">
> + <catalogue id="menu" name="menu" location="translations"/>
> + </catalogues>
> + <!-- Commented out to verify your translations
> + <untranslated-text>untranslated</untranslated-text> -->
> + <cache-at-startup>true</cache-at-startup>
> + </map:transformer>
> +
> </map:transformers>
>
> <map:readers default="resource">
> @@ -100,6 +110,10 @@
> <map:selectors>
> <map:selector logger="sitemap.selector.exists" name="exists" src="org.apache.cocoon.selection.ResourceExistsSelector" />
> </map:selectors>
> + <map:actions>
> + <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction" />
> + </map:actions>
> +
...
Please define components in the sitemap where they are used, not in
sitemap.xmap. It minimises dependencies between sitemaps.
For example, Cocoon has an overridden sitemap.xmap, and their build was
broken because the overridden sitemap.xmap didn't define components that
forrest.xmap and menu.xmap need:
* [0] favicon.ico
X [0] index.html BROKEN: Type 'locale' is not defined for 'act' at file:/old/home/jeff/homeoverflow/apache/xml/cocoon-2.1/build/cocoon-2.1.2-dev/tmp/context/menu.xmap:100:37
Total time: 0 minutes 10 seconds
* [0] favicon.ico
X [0] index.html BROKEN: Type 'i18n' is not defined for 'transform' at file:/old/home/jeff/homeoverflow/apache/xml/cocoon-2.1/build/cocoon-2.1.2-dev/tmp/context/menu.xmap:104:35
Total time: 0 minutes 9 seconds
* [0] favicon.ico
X [0] index.html BROKEN: Type 'serverpages' is not defined for 'generate' at file:/old/home/jeff/homeoverflow/apache/xml/cocoon-2.1/build/cocoon-2.1.2-dev/tmp/context/forrest.xmap:221:81
Total time: 0 minutes 9 seconds
--Jeff
Re: Declaring components where they are used (Re: cvs commit: xml-forrest/src/resources/stylesheets
i18n.xsl)
Posted by Juan Jose Pablos <ch...@che-che.com>.
Jeff Turner wrote:
> Please define components in the sitemap where they are used, not in
> sitemap.xmap. It minimises dependencies between sitemaps.
>
> For example, Cocoon has an overridden sitemap.xmap, and their build was
> broken because the overridden sitemap.xmap didn't define components that
> forrest.xmap and menu.xmap need:
>
> * [0] favicon.ico
> X [0] index.html BROKEN: Type 'locale' is not defined for 'act' at file:/old/home/jeff/homeoverflow/apache/xml/cocoon-2.1/build/cocoon-2.1.2-dev/tmp/context/menu.xmap:100:37
> Total time: 0 minutes 10 seconds
>
>
> * [0] favicon.ico
> X [0] index.html BROKEN: Type 'i18n' is not defined for 'transform' at file:/old/home/jeff/homeoverflow/apache/xml/cocoon-2.1/build/cocoon-2.1.2-dev/tmp/context/menu.xmap:104:35
> Total time: 0 minutes 9 seconds
>
The reason of why I put in18 transformer and local action on the sitemap
is because they are going to be used on more places than the menu.xmap:
To translate the tab matcher you need to include both components on sitemap.
So adding both components on sitemap is the right place to do it, as
they have been used in more thant one sitemap.
Revert that commit so in18 and locale components have been define on
sitemap.
Cheers,
Cheche