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 2008/02/07 22:44:53 UTC
svn commit: r619654 - in /lenya/trunk/src/webapp: global-sitemap.xmap
lenya/xslt/menu/stripMenuRoots.xsl lenya/xslt/modules/modules2include.xsl
lenya/xslt/modules/modules2xinclude.xsl
Author: andreas
Date: Thu Feb 7 13:44:51 2008
New Revision: 619654
URL: http://svn.apache.org/viewvc?rev=619654&view=rev
Log:
Changing menu inclusion from XInclude to Include.
Added:
lenya/trunk/src/webapp/lenya/xslt/menu/stripMenuRoots.xsl
lenya/trunk/src/webapp/lenya/xslt/modules/modules2include.xsl
- copied, changed from r619333, lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl
Removed:
lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl
Modified:
lenya/trunk/src/webapp/global-sitemap.xmap
Modified: lenya/trunk/src/webapp/global-sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/global-sitemap.xmap?rev=619654&r1=619653&r2=619654&view=diff
==============================================================================
--- lenya/trunk/src/webapp/global-sitemap.xmap (original)
+++ lenya/trunk/src/webapp/global-sitemap.xmap Thu Feb 7 13:44:51 2008
@@ -131,7 +131,7 @@
<map:serialize type="xml"/>
</map:match>
<!-- for everything else: -->
- <map:generate src="cocoon:/menu-xml/{1}.xml"/>
+ <map:generate src="cocoon:/{1}/lenyaMenuBar.xml"/>
<map:transform type="menufilter"/>
<!-- Disable menu items according to usecase policies -->
<map:transform type="usecasemenu"/>
@@ -160,13 +160,14 @@
<!-- collect the menu items for the publication and all modules used in the publication -->
- <!-- menu-xml/{pubId}.xml -->
- <map:match pattern="menu-xml/*.xml">
+ <!-- {pubId}/lenyaMenuBar.xml -->
+ <map:match pattern="*/lenyaMenuBar.xml">
<map:generate src="aggregate-fallback://config/publication.xml"/>
- <map:transform src="lenya/xslt/modules/modules2xinclude.xsl">
+ <map:transform src="lenya/xslt/modules/modules2include.xsl">
<map:parameter name="pub" value="{1}"/>
</map:transform>
- <map:transform type="xinclude"/>
+ <map:transform type="include"/>
+ <map:transform src="lenya/xslt/menu/stripMenuRoots.xsl"/>
<map:transform src="lenya/xslt/menu/merge-menus.xsl"/>
<map:serialize type="xml"/>
</map:match>
Added: lenya/trunk/src/webapp/lenya/xslt/menu/stripMenuRoots.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/menu/stripMenuRoots.xsl?rev=619654&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/menu/stripMenuRoots.xsl (added)
+++ lenya/trunk/src/webapp/lenya/xslt/menu/stripMenuRoots.xsl Thu Feb 7 13:44:51 2008
@@ -0,0 +1,32 @@
+<?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:menu="http://apache.org/cocoon/lenya/menubar/1.0">
+
+ <xsl:template match="/menu:menu/menu:menu">
+ <xsl:apply-templates select="*"/>
+ </xsl:template>
+
+
+ <xsl:template match="@*|node()" priority="-2">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Copied: lenya/trunk/src/webapp/lenya/xslt/modules/modules2include.xsl (from r619333, lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl)
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/modules/modules2include.xsl?p2=lenya/trunk/src/webapp/lenya/xslt/modules/modules2include.xsl&p1=lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl&r1=619333&r2=619654&rev=619654&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/modules/modules2include.xsl Thu Feb 7 13:44:51 2008
@@ -16,12 +16,10 @@
limitations under the License.
-->
-<!-- $Id: xinclude.xsl 123414 2004-12-27 14:52:24Z gregor $ -->
-
<xsl:stylesheet version="1.0"
xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1"
xmlns:menu="http://apache.org/cocoon/lenya/menubar/1.0"
- xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:i="http://apache.org/cocoon/include/1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
@@ -29,14 +27,16 @@
<xsl:template match="lenya:publication">
<menu:menu>
- <xi:include href="cocoon:/menu-xml/pub/{$pub}.xml" xpointer="xpointer(/*/*)"/>
+ <i:include src="cocoon:/menu-xml/pub/{$pub}.xml"/>
<xsl:apply-templates select="lenya:modules/lenya:module"/>
</menu:menu>
</xsl:template>
<xsl:template match="lenya:module">
<xsl:if test="not(preceding-sibling::lenya:module[@name = current()/@name])">
- <xi:include href="cocoon:/menu-xml/module/{@name}.xml" xpointer="xpointer(/*/*)"/>
+ <i:include src="cocoon:/menu-xml/module/{@name}.xml">
+ <i:fallback/>
+ </i:include>
</xsl:if>
</xsl:template>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org