Author: andreas
Date: Sun Feb 10 16:51:22 2008
New Revision: 620363
URL: http://svn.apache.org/viewvc?rev=620363&view=rev
Log:
Enable fallback for non-existing i18n catalogues, include core catalogue in pub catalogue assembly.
Modified:
lenya/trunk/src/modules-core/i18n/sitemap.xmap
lenya/trunk/src/modules-core/i18n/xslt/modules2include.xsl
Modified: lenya/trunk/src/modules-core/i18n/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/i18n/sitemap.xmap?rev=620363&r1=620362&r2=620363&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/i18n/sitemap.xmap (original)
+++ lenya/trunk/src/modules-core/i18n/sitemap.xmap Sun Feb 10 16:51:22 2008
@@ -34,21 +34,25 @@
call prevents it from being cached. -->
<!-- catalogue/{1:catalogue} -->
<map:match pattern="catalogue/*">
- <map:select type="parameter">
- <map:parameter name="parameter-selector-test" value="{page-envelope:is-publication}"/>
- <map:when test="true">
- <map:generate src="cocoon:/{page-envelope:publication-id}/{1}"/>
+ <map:select type="resource-exists">
+ <map:when test="context://lenya/resources/i18n/{1}">
+ <map:select type="parameter">
+ <map:parameter name="parameter-selector-test" value="{page-envelope:is-publication}"/>
+ <map:when test="true">
+ <map:generate src="cocoon:/pubCatalogue/{page-envelope:publication-id}/{1}"/>
+ </map:when>
+ <map:otherwise>
+ <map:generate src="context://lenya/resources/i18n/{1}"/>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="xml"/>
</map:when>
- <map:otherwise>
- <map:generate src="fallback://lenya/resources/i18n/{1}"/>
- </map:otherwise>
</map:select>
- <map:serialize type="xml"/>
</map:match>
<!-- This pipeline generates the catalogue for each publication. The result is cached. -->
<!-- {1:pub}/{2:catalogue} -->
- <map:match pattern="*/*">
+ <map:match pattern="pubCatalogue/*/*">
<map:generate src="aggregate-fallback://config/publication.xml"/>
<map:transform src="xslt/modules2include.xsl">
<map:parameter name="pub" value="{1}"/>
Modified: lenya/trunk/src/modules-core/i18n/xslt/modules2include.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/i18n/xslt/modules2include.xsl?rev=620363&r1=620362&r2=620363&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/i18n/xslt/modules2include.xsl (original)
+++ lenya/trunk/src/modules-core/i18n/xslt/modules2include.xsl Sun Feb 10 16:51:22 2008
@@ -32,6 +32,7 @@
<i18n:catalogue>
<i:include src="cocoon:/pubs/{$pub}/{$catalogue}" strip-root="true"/>
<xsl:apply-templates select="lenya:modules/lenya:module"/>
+ <i:include src="fallback://lenya/resources/i18n/{$catalogue}" strip-root="true"/>
</i18n:catalogue>
</xsl:template>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.