You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2010/07/11 22:58:09 UTC
svn commit: r963149 - in /lenya/branches/BRANCH_2_1_X/src/modules-core/i18n:
sitemap.xmap xslt/flattenCatalogue.xsl xslt/modules2include.xsl
Author: andreas
Date: Sun Jul 11 20:58:09 2010
New Revision: 963149
URL: http://svn.apache.org/viewvc?rev=963149&view=rev
Log:
Include transformer doesn't support strip-root attribute, flatten XML structure after inclusion instead.
Added:
lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/flattenCatalogue.xsl
Modified:
lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/sitemap.xmap
lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/modules2include.xsl
Modified: lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/sitemap.xmap?rev=963149&r1=963148&r2=963149&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/sitemap.xmap (original)
+++ lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/sitemap.xmap Sun Jul 11 20:58:09 2010
@@ -59,6 +59,7 @@
<map:parameter name="catalogue" value="{2}"/>
</map:transform>
<map:transform type="include"/>
+ <map:transform src="xslt/flattenCatalogue.xsl"/>
<map:serialize type="xml"/>
</map:match>
Added: lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/flattenCatalogue.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/flattenCatalogue.xsl?rev=963149&view=auto
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/flattenCatalogue.xsl (added)
+++ lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/flattenCatalogue.xsl Sun Jul 11 20:58:09 2010
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+
+ <xsl:template match="i18n:catalogue/i18n:catalogue">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+
+ <xsl:template match="@*|node()|comment()" priority="-2">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+</xsl:stylesheet>
\ No newline at end of file
Modified: lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/modules2include.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/modules2include.xsl?rev=963149&r1=963148&r2=963149&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/modules2include.xsl (original)
+++ lenya/branches/BRANCH_2_1_X/src/modules-core/i18n/xslt/modules2include.xsl Sun Jul 11 20:58:09 2010
@@ -30,15 +30,15 @@
<xsl:template match="lenya:publication">
<i18n:catalogue>
- <i:include src="aggregate-fallback://lenya/resources/i18n/{$catalogue}" strip-root="true"/>
+ <i:include src="aggregate-fallback://lenya/resources/i18n/{$catalogue}"/>
<xsl:apply-templates select="lenya:modules/lenya:module"/>
</i18n:catalogue>
</xsl:template>
<xsl:template match="lenya:module">
<xsl:if test="not(preceding-sibling::lenya:module[@name = current()/@name])">
- <i:include src="cocoon:/modules/{@name}/{$catalogue}" strip-root="true"/>
+ <i:include src="cocoon:/modules/{@name}/{$catalogue}"/>
</xsl:if>
- </xsl:template>
-
+ </xsl:template>
+
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org