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 2005/07/05 18:19:23 UTC
svn commit: r209293 [3/3] - in /lenya/trunk/src:
java/org/apache/lenya/cms/cocoon/components/modules/input/
java/org/apache/lenya/cms/cocoon/generation/
java/org/apache/lenya/cms/cocoon/transformation/
java/org/apache/lenya/cms/site/tree/ java/org/apac...
Added: lenya/trunk/src/publets/sitetree/resources/javascript/ua.js
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/resources/javascript/ua.js?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/resources/javascript/ua.js (added)
+++ lenya/trunk/src/publets/sitetree/resources/javascript/ua.js Tue Jul 5 09:19:18 2005
@@ -0,0 +1,153 @@
+/*
+ * $Log: ua.js,v $
+ * Revision 1.2 2003/06/06 17:42:13 gregor
+ * *** keyword substitution change ***
+ *
+ * Revision 1.1 2003/05/21 15:20:33 gregor
+ * first cut of a tree widget for the admin area. comes with a preliminary xsl that converts a sitetree to the required javascript.
+ *
+ * Revision 1.9 2002/07/22 14:06:21 bc6ix
+ * fix license path, change version reporting to use 2 digits for each level
+ *
+ * Revision 1.8 2002/07/07 08:23:07 bc6ix
+ * fix line endings
+ *
+ * Revision 1.7 2002/05/14 16:52:52 bc6ix
+ * use CVS Log for revision history
+ *
+ *
+ */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ * Full Terms at http://bclary.com/lib/js/license/mpl-tri-license.txt
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Netscape code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2001
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Bob Clary <bc...@netscape.com>
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+function xbDetectBrowser()
+{
+ var oldOnError = window.onerror;
+ var element = null;
+
+ window.onerror = null;
+
+ // work around bug in xpcdom Mozilla 0.9.1
+ window.saveNavigator = window.navigator;
+
+ navigator.OS = '';
+ navigator.version = parseFloat(navigator.appVersion);
+ navigator.org = '';
+ navigator.family = '';
+
+ var platform;
+ if (typeof(window.navigator.platform) != 'undefined')
+ {
+ platform = window.navigator.platform.toLowerCase();
+ if (platform.indexOf('win') != -1)
+ navigator.OS = 'win';
+ else if (platform.indexOf('mac') != -1)
+ navigator.OS = 'mac';
+ else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
+ navigator.OS = 'nix';
+ }
+
+ var i = 0;
+ var ua = window.navigator.userAgent.toLowerCase();
+
+ if (ua.indexOf('safari') != -1)
+ {
+ i = ua.indexOf('safari');
+ navigator.family = 'safari';
+ navigator.org = 'safari';
+ navigator.version = parseFloat('0' + ua.substr(i+7), 10);
+ }
+ else if (ua.indexOf('opera') != -1)
+ {
+ i = ua.indexOf('opera');
+ navigator.family = 'opera';
+ navigator.org = 'opera';
+ navigator.version = parseFloat('0' + ua.substr(i+6), 10);
+ }
+ else if ((i = ua.indexOf('msie')) != -1)
+ {
+ navigator.org = 'microsoft';
+ navigator.version = parseFloat('0' + ua.substr(i+5), 10);
+
+ if (navigator.version < 4)
+ navigator.family = 'ie3';
+ else
+ navigator.family = 'ie4'
+ }
+ else if (ua.indexOf('gecko') != -1)
+ {
+ navigator.family = 'gecko';
+ var rvStart = ua.indexOf('rv:');
+ var rvEnd = ua.indexOf(')', rvStart);
+ var rv = ua.substring(rvStart+3, rvEnd);
+ var rvParts = rv.split('.');
+ var rvValue = 0;
+ var exp = 1;
+
+ for (var i = 0; i < rvParts.length; i++)
+ {
+ var val = parseInt(rvParts[i]);
+ rvValue += val / exp;
+ exp *= 100;
+ }
+ navigator.version = rvValue;
+
+ if (ua.indexOf('netscape') != -1)
+ navigator.org = 'netscape';
+ else if (ua.indexOf('compuserve') != -1)
+ navigator.org = 'compuserve';
+ else
+ navigator.org = 'mozilla';
+ }
+ else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
+ {
+ var is_major = parseFloat(navigator.appVersion);
+
+ if (is_major < 4)
+ navigator.version = is_major;
+ else
+ {
+ i = ua.lastIndexOf('/')
+ navigator.version = parseFloat('0' + ua.substr(i+1), 10);
+ }
+ navigator.org = 'netscape';
+ navigator.family = 'nn' + parseInt(navigator.appVersion);
+ }
+ else if ((i = ua.indexOf('aol')) != -1 )
+ {
+ // aol
+ navigator.family = 'aol';
+ navigator.org = 'aol';
+ navigator.version = parseFloat('0' + ua.substr(i+4), 10);
+ }
+ else if ((i = ua.indexOf('hotjava')) != -1 )
+ {
+ // hotjava
+ navigator.family = 'hotjava';
+ navigator.org = 'sun';
+ navigator.version = parseFloat(navigator.appVersion);
+ }
+
+ window.onerror = oldOnError;
+}
+
+xbDetectBrowser();
+
Added: lenya/trunk/src/publets/sitetree/resources/schemas/sitetree.xsd
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/resources/schemas/sitetree.xsd?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/resources/schemas/sitetree.xsd (added)
+++ lenya/trunk/src/publets/sitetree/resources/schemas/sitetree.xsd Tue Jul 5 09:19:18 2005
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: sitetree.xsd 42703 2004-03-13 12:57:53Z gregor $ -->
+
+<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN"
+ "http://www.w3.org/2001/XMLSchema.dtd">
+<xs:schema targetNamespace="http://apache.org/cocoon/lenya/sitetree/1.0" xmlns="http://apache.org/cocoon/lenya/sitetree/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <xs:element name="site">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="node" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="node">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="label" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="node" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/>
+ <xs:attribute name="href" type="xs:string" use="optional"/>
+ <xs:attribute name="suffix" type="xs:string" use="optional"/>
+ <xs:attribute name="link" type="xs:string" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="label">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
Added: lenya/trunk/src/publets/sitetree/sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/sitemap.xmap?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/sitemap.xmap (added)
+++ lenya/trunk/src/publets/sitetree/sitemap.xmap Tue Jul 5 09:19:18 2005
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: navigation.xmap 208680 2005-06-30 20:28:59Z chestnut $ -->
+
+<!--
+This sitemap creates default navigation components.
+-->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:components>
+ <map:generators default="file">
+ <map:generator name="sitetree-fragment" label="content,data" logger="sitemap.generator.sitetree-fragment" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.lenya.cms.cocoon.generation.SitetreeFragmentGenerator"/>
+ </map:generators>
+ <map:matchers default="wildcard">
+ <map:matcher name="language" logger="sitemap.matcher.wildcardrequestparameter" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
+ <parameter-name>lenya.language</parameter-name>
+ </map:matcher>
+ <map:matcher name="tab" logger="sitemap.matcher.wildcardrequestparameter" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
+ <parameter-name>lenya.info-tab</parameter-name>
+ </map:matcher>
+ </map:matchers>
+ </map:components>
+
+ <!-- =========================== Pipelines ================================ -->
+
+ <map:resources>
+
+ <map:resource name="fallback-transformation">
+ <map:transform src="fallback://lenya/publets/sitetree/xslt/navigation/{stylesheet}.xsl">
+ <map:parameter name="url" value="{url}"/>
+ <map:parameter name="root" value="{page-envelope:context-prefix}/{publication-id}/{page-envelope:area}/"/>
+ <map:parameter name="area" value="{page-envelope:area}"/>
+ <map:parameter name="chosenlanguage" value="{page-envelope:document-language}"/>
+ <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
+ <map:parameter name="breadcrumbprefix" value="{page-envelope:breadcrumb-prefix}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:resource>
+
+ <map:resource name="i18n">
+ <map:transform type="i18n">
+ <map:parameter name="locale" value="{request:locale}"/>
+ </map:transform>
+ </map:resource>
+
+ </map:resources>
+
+ <map:pipelines>
+
+ <map:pipeline>
+
+ <!-- sitetree -->
+ <!-- pattern: {pub-id}/{area}/sitetree/{url}.xml -->
+ <map:match pattern="*/*/sitetree/**.xml">
+ <map:generate src="fallback://content/{2}/sitetree.xml"/>
+ <map:transform type="i18n">
+ <map:parameter name="locale" value="{request:locale}"/>
+ </map:transform>
+ <map:call resource="fallback-transformation">
+ <map:parameter name="publication-id" value="{1}"/>
+ <map:parameter name="url" value="{3}"/>
+ <map:parameter name="stylesheet" value="sitetree2nav"/>
+ </map:call>
+ </map:match>
+
+
+ <!-- navigation element -->
+ <!-- pattern: {pub-id}/admin/{nav-element}/{url}.xml -->
+ <map:match pattern="*/admin/*/**.xml">
+ <map:generate src="cocoon:/{1}/admin/sitetree/{3}.xml"/>
+ <map:call resource="fallback-transformation">
+ <map:parameter name="publication-id" value="{1}"/>
+ <map:parameter name="url" value="{3}"/>
+ <map:parameter name="stylesheet" value="admin-{2}"/>
+ </map:call>
+ </map:match>
+
+ <!-- navigation element -->
+ <!-- pattern: {pub-id}/{area}/{nav-element}/{url}.xml -->
+ <map:match pattern="*/*/*/**.xml">
+ <map:generate src="cocoon:/{1}/{2}/sitetree/{4}.xml"/>
+ <map:call resource="fallback-transformation">
+ <map:parameter name="publication-id" value="{1}"/>
+ <map:parameter name="url" value="{4}"/>
+ <map:parameter name="stylesheet" value="{3}"/>
+ </map:call>
+ </map:match>
+
+ </map:pipeline>
+
+ <!-- usecases -->
+ <!-- Sitetree Javascript array -->
+ <map:pipeline type="noncaching">
+
+ <!-- {publication-id}/{area}/sitetree.xml -->
+ <map:match pattern="*/*/sitetree.xml">
+ <map:generate src="fallback://content/{2}/sitetree.xml"/>
+ <map:call resource="i18n"/>
+ <map:transform type="access-control-sitetree">
+ <map:parameter name="publication-id" value="{1}"/>
+ <map:parameter name="area" value="{2}"/>
+ </map:transform>
+ <map:transform src="fallback://lenya/publets/sitetree/xslt/info/sitetree2areatree.xsl">
+ <map:parameter name="area" value="{2}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <!-- {publication-id}/{area}/info-sitetree -->
+ <map:match pattern="*/*/info-sitetree/sitetree.js">
+ <map:select type="parameter">
+ <map:parameter name="parameter-selector-test" value="{request-param:incremental}"/>
+ <map:when test="true">
+ <map:generate src="content/util/empty.xml" />
+ <map:act type="set-header">
+ <map:parameter name="Cache-Control" value="pre-check=0" />
+ <map:parameter name="Expires" value="-1" />
+ </map:act>
+ </map:when>
+ <map:otherwise>
+ <map:aggregate element="lenya" label="aggregate">
+ <map:part src="cocoon:/{1}/authoring/sitetree.xml"/>
+ <map:part src="cocoon:/{1}/archive/sitetree.xml"/>
+ <map:part src="cocoon:/{1}/trash/sitetree.xml"/>
+ </map:aggregate>
+ <map:act type="set-header">
+ <map:parameter name="Cache-Control" value="pre-check=0" />
+ <map:parameter name="Expires" value="-1" />
+ </map:act>
+ <map:transform src="xslt/navigation/sitetree2nav.xsl" label="navtree">
+ <map:parameter name="chosenlanguage" value="{request-param:language}"/>
+ <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+
+ <map:transform src="xslt/info/sitetree2tree.xsl" label="content">
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
+ <map:parameter name="publicationid" value="{1}"/>
+ <map:parameter name="chosenlanguage" value="{request-param:language}"/>
+ <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
+ <map:parameter name="cutdocumentid" value="{session-attr:org.apache.lenya.cms.info.cutdocumentid}"/>
+ <map:parameter name="incremental" value="{request-param:incremental}"/>
+ <map:parameter name="areas" value="authoring,archive,trash"/>
+ </map:transform>
+
+ <map:serialize type="text"/>
+ </map:match>
+
+ <!-- {publication-id}/{area}/info-sitetree -->
+ <map:match pattern="*/*/info-sitetree/sitetree-fragment.xml">
+ <map:generate type="sitetree-fragment">
+ <map:parameter name="areas" value="{request-param:areas}"/>
+ <map:parameter name="area" value="{request-param:area}"/>
+ <map:parameter name="documentid" value="{request-param:documentid}"/>
+ <map:parameter name="initial" value="{request-param:initial}"/>
+ </map:generate>
+ <!-- <map:call resource="i18n"/> -->
+ <map:transform type="access-control-sitetree">
+ <map:parameter name="publication-id" value="{1}"/>
+ <map:parameter name="area" value="{2}"/>
+ </map:transform>
+ <map:act type="set-header">
+ <map:parameter name="Cache-Control" value="pre-check=0" />
+ <map:parameter name="Expires" value="-1" />
+ </map:act>
+ <map:transform src="xslt/navigation/sitetree2nav.xsl" label="navtree">
+ <map:parameter name="chosenlanguage" value="{request-param:language}"/>
+ <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+
+ <!-- Sitetree Javascript array -->
+ <map:pipeline>
+ <map:match pattern="*/*/info-sitetree/tree.js">
+ <map:read src="resources/javascript/tree.js"/>
+ <map:serialize type="text"/>
+ </map:match>
+ </map:pipeline>
+
+ <!-- Sitetree Javascript array -->
+ <map:pipeline>
+ <map:match pattern="*/*/info-sitetree/ua.js">
+ <map:read src="resources/javascript/ua.js"/>
+ <map:serialize type="text"/>
+ </map:match>
+ </map:pipeline>
+
+ </map:pipelines>
+
+</map:sitemap>
Added: lenya/trunk/src/publets/sitetree/xslt/info/sitetree2areatree.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/xslt/info/sitetree2areatree.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/xslt/info/sitetree2areatree.xsl (added)
+++ lenya/trunk/src/publets/sitetree/xslt/info/sitetree2areatree.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: sitetree2areatree.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
+
+<!--
+ Adds an area attribute to a sitetree root element.
+-->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:s="http://apache.org/cocoon/lenya/sitetree/1.0"
+ >
+
+<xsl:param name="area"/>
+
+<xsl:template match="s:site">
+ <s:site area="{$area}">
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </s:site>
+</xsl:template>
+
+
+<xsl:template match="@*|node()">
+ <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
Added: lenya/trunk/src/publets/sitetree/xslt/info/sitetree2tree.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/xslt/info/sitetree2tree.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/xslt/info/sitetree2tree.xsl (added)
+++ lenya/trunk/src/publets/sitetree/xslt/info/sitetree2tree.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,219 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: sitetree2tree.xsl 178428 2005-05-25 12:48:45Z andreas $ -->
+
+<!--
+ Converts a sitetree into a javascript array suitable for the tree widget.
+-->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:s="http://apache.org/cocoon/lenya/navigation/1.0">
+
+<xsl:import href="../../../../xslt/util/string-functions.xsl"/>
+
+<xsl:output omit-xml-declaration="yes"/>
+
+<xsl:param name="contextprefix"/>
+<xsl:param name="publicationid"/>
+<xsl:param name="chosenlanguage"/>
+<xsl:param name="defaultlanguage"/>
+<xsl:param name="cutdocumentid"/>
+<xsl:param name="incremental"/>
+<xsl:param name="areas"/>
+
+<xsl:template match="/">
+ <xsl:param name="parentPath"/>
+// You can find instructions for this file at http://www.treeview.net
+
+//Environment variables are usually set at the top of this file.
+USETEXTLINKS = 1
+STARTALLOPEN = 0
+USEFRAMES = 0
+USEICONS = 0
+WRAPTEXT = 1
+PRESERVESTATE = 1
+HIGHLIGHT = 1
+HIGHLIGHT_BG = "#DDDCCF"
+HIGHLIGHT_COLOR = "#666666"
+CONTEXT_PREFIX = "<xsl:value-of select="$contextprefix"/>";
+PUBLICATION_ID = "<xsl:value-of select="$publicationid"/>";
+CHOSEN_LANGUAGE = "<xsl:value-of select="$chosenlanguage"/>";
+DEFAULT_LANGUAGE = "<xsl:value-of select="$defaultlanguage"/>";
+CUT_DOCUMENT_ID = "<xsl:value-of select="$cutdocumentid"/>";
+ALL_AREAS = "<xsl:value-of select="$areas"/>"
+PIPELINE_PATH = '/authoring/info-sitetree/sitetree-fragment.xml'
+<xsl:choose>
+ <xsl:when test="$incremental='true'">
+INCREMENTAL_LOADING = true;
+ </xsl:when>
+ <xsl:otherwise>
+INCREMENTAL_LOADING = false;
+ </xsl:otherwise>
+</xsl:choose>
+
+<!-- incremental loading does not work with the preserve state mechanism (cookies) -->
+if (INCREMENTAL_LOADING) PRESERVESTATE=0;
+
+foldersTree = gFld("<strong><xsl:value-of select="$publicationid"/></strong>")
+
+ <xsl:if test="$incremental!='true'">
+ <xsl:apply-templates select="lenya/s:site"/>
+ </xsl:if>
+
+//Set this string if Treeview and other configuration files may also be loaded in the same session
+foldersTree.treeID = "t2"
+</xsl:template>
+
+<xsl:template match="s:site">
+ <xsl:param name="parentPath"/>
+ <xsl:variable name="suffix">
+ <xsl:if test="not($chosenlanguage = $defaultlanguage)">_<xsl:value-of select="$chosenlanguage"/></xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="link">
+ <xsl:if test="not(@protected = 'true')">
+ <xsl:text>, "</xsl:text>
+ <xsl:value-of select="concat($contextprefix, '/', $publicationid, '/', @area, '/', $suffix)"/>
+ <xsl:text>?lenya.usecase=tab.overview</xsl:text>
+ <xsl:text>"</xsl:text>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="protected-pre"><xsl:if test="@protected = 'true'"><span class=\"lenya-info-protected\"></xsl:if></xsl:variable>
+ <xsl:variable name="protected-post"><xsl:if test="@protected = 'true'"></span></xsl:if></xsl:variable>
+
+ <xsl:variable name="pre" select="$protected-pre"/>
+ <xsl:variable name="post" select="$protected-post"/>
+
+ <xsl:choose>
+ <!-- FIXME
+ The area nodes must not be clickable unless we find a solution for non-document URLs.
+ The nodes were used for area access control and for an overview of the scheduled jobs.
+
+ <xsl:when test="descendant::s:node"><xsl:value-of select="generate-id(.)"/> = insFld(foldersTree, gFld(" <xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/> " <xsl:value-of select="$link"/>))</xsl:when>
+ <xsl:otherwise>insDoc(foldersTree, gLnk("S", " <xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/> " <xsl:value-of select="$link"/>))</xsl:otherwise>
+ -->
+
+ <xsl:when test="descendant::s:node"><xsl:value-of select="generate-id(.)"/> = insFld(foldersTree, gFld(" <xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/> "))</xsl:when>
+ <xsl:otherwise>insDoc(foldersTree, gLnk("S", " <xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/> "))</xsl:otherwise>
+
+ </xsl:choose>
+ <xsl:apply-templates>
+ <xsl:with-param name="parentPath"><xsl:value-of select="@id"/></xsl:with-param>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="s:node">
+ <xsl:param name="parentPath"/>
+ <xsl:variable name="tree-area" select="ancestor::s:site/@area"/>
+ <xsl:variable name="link">
+ <xsl:if test="not(@protected = 'true')">
+ <xsl:text>, "</xsl:text>
+ <xsl:value-of select="concat($contextprefix, '/', $publicationid, '/', $tree-area, '/', @basic-url, @language-suffix, @suffix)"/>
+ <xsl:text>?lenya.usecase=tab.overview</xsl:text>
+ <xsl:text>"</xsl:text>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="exists-language" select="s:label[lang($chosenlanguage)]"/>
+
+ <xsl:variable name="protected-pre"><xsl:if test="@protected = 'true'"><span class=\"lenya-info-protected\"></xsl:if></xsl:variable>
+ <xsl:variable name="protected-post"><xsl:if test="@protected = 'true'"></span></xsl:if></xsl:variable>
+
+ <xsl:variable name="no-language-pre"><xsl:if test="not($exists-language)"><span class=\"lenya-info-nolanguage\"></xsl:if></xsl:variable>
+ <xsl:variable name="no-language-post"><xsl:if test="not($exists-language)"></span></xsl:if></xsl:variable>
+
+ <xsl:variable name="cut-pre"><xsl:if test="$cutdocumentid = concat('/', @basic-url)"><span class='lenya-info-cut'>[</xsl:if></xsl:variable>
+ <xsl:variable name="cut-post"><xsl:if test="$cutdocumentid = concat('/', @basic-url)">]</span></xsl:if></xsl:variable>
+
+ <xsl:variable name="pre" select="concat($no-language-pre, $protected-pre, $cut-pre)"/>
+ <xsl:variable name="post" select="concat($cut-post, $protected-post, $no-language-post)"/>
+
+ <xsl:choose>
+ <xsl:when test="descendant::s:node">
+ <xsl:value-of select="generate-id(.)"/>
+ = insFld(
+ <xsl:value-of select="generate-id(..)"/>,
+ gFld("<span style=\"padding: 0px 5px;\"><xsl:value-of select="$pre"/><xsl:call-template name="getLabel"/><xsl:value-of select="$post"/></span>"
+ <xsl:value-of select="$link"/>)
+ );
+ </xsl:when>
+ <xsl:otherwise>
+ insDoc(<xsl:value-of select="generate-id(..)"/>,
+ gLnk(
+ "S",
+ "<span style=\"padding: 0px 5px;\"><xsl:value-of select="$pre"/><xsl:call-template name="getLabel"/></span>"
+ <xsl:value-of select="$link"/>)
+ );
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates>
+ <xsl:with-param name="parentPath"><xsl:value-of select="$parentPath"/>/<xsl:value-of select="@id"/></xsl:with-param>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template name="getLabel">
+ <xsl:choose>
+ <xsl:when test="s:label[lang($chosenlanguage)]">
+ <xsl:call-template name="escape-characters">
+ <xsl:with-param name="input" select="s:label[lang($chosenlanguage)]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="s:label[lang($defaultlanguage)]">
+ <xsl:call-template name="escape-characters">
+ <xsl:with-param name="input" select="s:label[lang($defaultlanguage)]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="escape-characters">
+ <xsl:with-param name="input" select="s:label"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="s:label"/>
+
+
+<xsl:template name="escape-characters">
+ <xsl:param name="input"/>
+ <xsl:variable name="escape-lt">
+ <xsl:call-template name="search-and-replace">
+ <xsl:with-param name="input" select="$input"/>
+ <xsl:with-param name="search-string"><</xsl:with-param>
+ <xsl:with-param name="replace-string">&lt;</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="escape-gt">
+ <xsl:call-template name="search-and-replace">
+ <xsl:with-param name="input" select="$escape-lt"/>
+ <xsl:with-param name="search-string">></xsl:with-param>
+ <xsl:with-param name="replace-string">&gt;</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="escape-quot">
+ <xsl:call-template name="search-and-replace">
+ <xsl:with-param name="input" select="$escape-gt"/>
+ <xsl:with-param name="search-string">"</xsl:with-param>
+ <xsl:with-param name="replace-string">\"</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$escape-quot"/>
+</xsl:template>
+
+</xsl:stylesheet>
Added: lenya/trunk/src/publets/sitetree/xslt/navigation/breadcrumb.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/xslt/navigation/breadcrumb.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/xslt/navigation/breadcrumb.xsl (added)
+++ lenya/trunk/src/publets/sitetree/xslt/navigation/breadcrumb.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: breadcrumb.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="nav"
+ >
+
+<xsl:template match="nav:site">
+ <div id="breadcrumb">
+ <xsl:apply-templates select="nav:node"/>
+</div>
+</xsl:template>
+
+
+<xsl:template match="nav:node">
+
+ <xsl:if test="descendant-or-self::nav:node[@current = 'true']">
+ <xsl:call-template name="separator"/>
+ <xsl:call-template name="step"/>
+ <xsl:apply-templates select="nav:node"/>
+ </xsl:if>
+
+</xsl:template>
+
+
+<xsl:template name="step">
+ <xsl:choose>
+ <xsl:when test="@current = 'true'">
+ <xsl:apply-templates select="nav:label"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{@href}"><xsl:apply-templates select="nav:label"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="nav:label">
+ <xsl:value-of select="."/>
+</xsl:template>
+
+
+<xsl:template name="separator">
+ »
+</xsl:template>
+
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>
Added: lenya/trunk/src/publets/sitetree/xslt/navigation/menu.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/xslt/navigation/menu.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/xslt/navigation/menu.xsl (added)
+++ lenya/trunk/src/publets/sitetree/xslt/navigation/menu.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: menu.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="nav"
+ >
+
+
+<xsl:template match="nav:site">
+ <div id="menu">
+ <xsl:apply-templates select="nav:node"/>
+ </div>
+</xsl:template>
+
+
+<xsl:template match="nav:node">
+ <xsl:choose>
+ <xsl:when test="descendant-or-self::nav:node[@current = 'true']">
+ <div class="menublock-selected-{count(ancestor-or-self::nav:node)}">
+ <xsl:call-template name="item"/>
+ <xsl:apply-templates select="nav:node"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="menublock-{count(ancestor-or-self::nav:node)}">
+ <xsl:call-template name="item"/>
+ <xsl:apply-templates select="nav:node"/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="item">
+ <xsl:choose>
+ <xsl:when test="@current = 'true'">
+ <xsl:call-template name="item-selected"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="item-default"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="item-default">
+ <div class="menuitem-{count(ancestor-or-self::nav:node)}">
+ <a href="{@href}"><xsl:apply-templates select="nav:label"/></a>
+ </div>
+</xsl:template>
+
+
+<xsl:template name="item-selected">
+ <div class="menuitem-selected-{count(ancestor-or-self::nav:node)}">
+ <xsl:apply-templates select="nav:label"/>
+ </div>
+</xsl:template>
+
+
+<xsl:template match="nav:label">
+ <xsl:value-of select="."/>
+</xsl:template>
+
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>
Added: lenya/trunk/src/publets/sitetree/xslt/navigation/search.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/xslt/navigation/search.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/xslt/navigation/search.xsl (added)
+++ lenya/trunk/src/publets/sitetree/xslt/navigation/search.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: search.xsl 76019 2004-11-16 20:13:32Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="nav"
+ >
+
+<xsl:param name="area"/>
+<xsl:param name="root"/>
+
+<xsl:template match="nav:site">
+ <div id="search">
+ <form action="{$root}../search-{$area}/lucene"><p><input class="searchfield" type="text" name="queryString" alt="Search field"/><input class="searchsubmit" type="submit" value="Search" name="find"/></p></form>
+ </div>
+</xsl:template>
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
Added: lenya/trunk/src/publets/sitetree/xslt/navigation/sitetree2nav.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/xslt/navigation/sitetree2nav.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/xslt/navigation/sitetree2nav.xsl (added)
+++ lenya/trunk/src/publets/sitetree/xslt/navigation/sitetree2nav.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: sitetree2nav.xsl 153044 2005-02-09 09:32:59Z michi $ -->
+
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:tree="http://apache.org/cocoon/lenya/sitetree/1.0"
+ xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
+ exclude-result-prefixes="tree"
+ >
+
+<xsl:param name="url"/>
+<xsl:param name="chosenlanguage"/>
+<xsl:param name="defaultlanguage"/>
+
+<xsl:variable name="path-to-context"><xsl:call-template name="create-path-to-context"/></xsl:variable>
+<xsl:variable name="root" select="$path-to-context"/>
+
+<xsl:template name="create-path-to-context">
+ <xsl:param name="local-url" select="$url"/>
+ <xsl:if test="contains($local-url, '/')">
+ <xsl:text/>../<xsl:call-template name="create-path-to-context">
+ <xsl:with-param name="local-url" select="substring-after($local-url, '/')"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+
+<xsl:template match="tree:fragment">
+ <nav:fragment>
+ <xsl:copy-of select="@*"/>
+ <xsl:choose>
+ <xsl:when test="@base">
+ <xsl:apply-templates>
+ <xsl:with-param name="previous-url" select="concat(substring-after(@base, '/'), '/')"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </nav:fragment>
+</xsl:template>
+
+
+<xsl:template match="tree:site">
+
+ <nav:site url="{$root}{$url}" request-url="{$url}">
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </nav:site>
+
+</xsl:template>
+
+
+<!--
+Resolves the existing language of a node, preferrably
+the default language.
+-->
+<xsl:template name="resolve-existing-language">
+ <xsl:choose>
+ <xsl:when test="tree:label[lang($chosenlanguage)]"><xsl:value-of select="$chosenlanguage"/></xsl:when>
+ <xsl:when test="tree:label[lang($defaultlanguage)]"><xsl:value-of select="$defaultlanguage"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="tree:label/@xml:lang"/></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+
+<!--
+Apply nodes recursively
+-->
+<xsl:template match="tree:node[not(@visible = 'false')]">
+
+ <!-- basic url of parent node -->
+ <xsl:param name="previous-url" select="''"/>
+
+ <xsl:variable name="existinglanguage">
+ <xsl:call-template name="resolve-existing-language"/>
+ </xsl:variable>
+
+ <nav:node>
+
+ <xsl:copy-of select="@id"/>
+ <xsl:copy-of select="@protected"/>
+ <xsl:copy-of select="@folder"/>
+
+ <!-- basic url - for all nodes -->
+
+ <xsl:variable name="basic-url">
+ <xsl:text/>
+ <xsl:choose>
+ <xsl:when test="@href">
+ <xsl:value-of select="@href"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$previous-url"/><xsl:value-of select="@id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="language-suffix">
+ <xsl:text>_</xsl:text><xsl:value-of select="$existinglanguage"/>
+ </xsl:variable>
+
+ <xsl:variable name="canonical-language-suffix">
+ <xsl:choose>
+ <xsl:when test="$existinglanguage != '' and $defaultlanguage != $existinglanguage">
+ <xsl:value-of select="$language-suffix"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- no suffix for default language -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- suffix - only when @href is not present -->
+
+ <xsl:variable name="suffix">
+ <xsl:if test="not(@href)">
+ <xsl:text>.</xsl:text>
+ <xsl:choose>
+ <xsl:when test="@suffix">
+ <xsl:value-of select="@suffix"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>html</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:attribute name="suffix"><xsl:value-of select="$suffix"/></xsl:attribute>
+ <xsl:attribute name="basic-url"><xsl:value-of select="$previous-url"/><xsl:value-of select="@id"/></xsl:attribute>
+ <xsl:attribute name="language-suffix"><xsl:value-of select="$canonical-language-suffix"/></xsl:attribute>
+
+ <xsl:variable name="canonical-url">
+ <xsl:text/>
+ <xsl:value-of select="$basic-url"/><xsl:text/>
+ <xsl:value-of select="$canonical-language-suffix"/><xsl:text/>
+ <xsl:value-of select="$suffix"/><xsl:text/>
+ </xsl:variable>
+
+ <xsl:variable name="non-canonical-url">
+ <xsl:text/>
+ <xsl:value-of select="$basic-url"/><xsl:text/>
+ <xsl:value-of select="$language-suffix"/><xsl:text/>
+ <xsl:value-of select="$suffix"/><xsl:text/>
+ </xsl:variable>
+
+ <xsl:if test="$url = $canonical-url or $url = $non-canonical-url">
+ <xsl:attribute name="current">true</xsl:attribute>
+ </xsl:if>
+
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="@href">
+ <xsl:value-of select="@href"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($root, $canonical-url)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+
+ <xsl:choose>
+ <xsl:when test="tree:label[lang($existinglanguage)]">
+ <xsl:apply-templates select="tree:label[lang($existinglanguage)]">
+ <xsl:with-param name="previous-url" select="concat($basic-url, '/')"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="tree:label[1]">
+ <xsl:with-param name="previous-url" select="concat($basic-url, '/')"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:apply-templates select="tree:node">
+ <xsl:with-param name="previous-url" select="concat($basic-url, '/')"/>
+ </xsl:apply-templates>
+
+ </nav:node>
+</xsl:template>
+
+
+<xsl:template match="tree:label">
+ <nav:label>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </nav:label>
+</xsl:template>
+
+
+<xsl:template match="@*|node()" priority="-1">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>
Added: lenya/trunk/src/publets/sitetree/xslt/navigation/tabs.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/sitetree/xslt/navigation/tabs.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/publets/sitetree/xslt/navigation/tabs.xsl (added)
+++ lenya/trunk/src/publets/sitetree/xslt/navigation/tabs.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: tabs.xsl 189880 2005-06-10 02:36:09Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="nav"
+ >
+
+
+<xsl:template match="nav:site">
+
+ <div id="tabs">
+
+ <xsl:call-template name="pre-separator"/>
+ <xsl:for-each select="nav:node">
+ <xsl:if test="position() > 1">
+ <xsl:call-template name="separator"/>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="@visibleinnav = 'false'"/>
+ <xsl:when test="descendant-or-self::nav:node[@current = 'true']">
+ <xsl:call-template name="tab-selected"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="tab"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:for-each>
+ <xsl:call-template name="post-separator"/>
+ </div>
+</xsl:template>
+
+
+<xsl:template name="tab">
+ <span class="tab"><xsl:call-template name="label"/></span>
+</xsl:template>
+
+
+<xsl:template name="tab-selected">
+ <span class="tab-selected"><xsl:call-template name="label"/></span>
+</xsl:template>
+
+
+<xsl:template name="label">
+ <xsl:choose>
+ <xsl:when test="@current='true'"><xsl:apply-templates select="nav:label"/></xsl:when>
+ <xsl:otherwise><a href="{@href}"><xsl:apply-templates select="nav:label"/></a></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="nav:label">
+ <xsl:value-of select="."/>
+</xsl:template>
+
+
+<xsl:template name="pre-separator">
+</xsl:template>
+
+
+<xsl:template name="separator">
+ <xsl:text> </xsl:text>
+</xsl:template>
+
+
+<xsl:template name="post-separator">
+</xsl:template>
+
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>
Modified: lenya/trunk/src/resources/dev/eclipse/checkstyle-plugin.cfg
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/resources/dev/eclipse/checkstyle-plugin.cfg?rev=209293&r1=209292&r2=209293&view=diff
==============================================================================
--- lenya/trunk/src/resources/dev/eclipse/checkstyle-plugin.cfg (original)
+++ lenya/trunk/src/resources/dev/eclipse/checkstyle-plugin.cfg Tue Jul 5 09:19:18 2005
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<!-- $Id: checkstyle-plugin.cfg,v 1.3 2004/03/13 12:44:37 gregor Exp $ -->
+<!-- $Id$ -->
<checkstyle-configurations file-format-version="1.0.0">
<check-configuration name="standard">
Modified: lenya/trunk/src/resources/dev/eclipse/make-classpath.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/resources/dev/eclipse/make-classpath.xsl?rev=209293&r1=209292&r2=209293&view=diff
==============================================================================
--- lenya/trunk/src/resources/dev/eclipse/make-classpath.xsl (original)
+++ lenya/trunk/src/resources/dev/eclipse/make-classpath.xsl Tue Jul 5 09:19:18 2005
@@ -18,7 +18,7 @@
Build the Eclipse .classpath file from a list of path items
(see "eclipse-project" target in build.xml)
- $Id: make-classpath.xsl,v 1.1 2004/03/21 21:26:21 gregor Exp $
+ $Id$
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Modified: lenya/trunk/src/targets/test-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/test-build.xml?rev=209293&r1=209292&r2=209293&view=diff
==============================================================================
--- lenya/trunk/src/targets/test-build.xml (original)
+++ lenya/trunk/src/targets/test-build.xml Tue Jul 5 09:19:18 2005
@@ -25,6 +25,7 @@
<!-- === Test targets =========================================================== -->
+ <property name="debug" value="true"/>
<property name="test.pub.id" value="test"/>
<property name="test.pub.source.id" value="default"/>
@@ -44,6 +45,7 @@
<!-- Prepares the test publication -->
<target name="test.pub.prepare">
+ <!--
<property name="test.pub.dir" value="${build.webapp}/lenya/pubs/${test.pub.id}"/>
@@ -54,6 +56,7 @@
<fileset dir="${build.webapp}/lenya/pubs/${test.pub.source.id}"/>
</copy>
+ -->
</target>
<!-- prepares the tests. -->
@@ -70,7 +73,8 @@
<!-- Compile tests -->
<javac srcdir="${src.test.dir}"
destdir="${build.test}"
- debug="{debug}"
+ debug="true"
+ debuglevel="lines,vars,source"
optimize="{optimize}"
deprecation="{deprecation}"
target="${target.vm}"
@@ -86,6 +90,9 @@
<!-- Runs JUnit tests -->
<target name="tests.junit" depends="init, tests.prepare,
+ test.identity" />
+
+ <!--
test.identity,
test.workflow,
test.anttask,
@@ -93,12 +100,12 @@
test.accesscontrol,
test.deactivate,
test.publications" />
-
+ -->
<!-- Identity Test -->
<target name="test.identity">
- <java fork="yes" classname="org.apache.lenya.ac.impl.IdentityTest">
+ <java fork="no" classname="org.apache.lenya.ac.impl.IdentityTest">
<arg value="${build.webapp}"/>
<arg value="default"/>
<classpath refid="classpath"/>
@@ -106,6 +113,7 @@
<pathelement location="${build.test}" />
<pathelement path="${build.webapp}/WEB-INF/classes" />
<pathelement path="${build.webapp}/WEB-INF/lib" />
+ <pathelement path="${src.test.dir}"/>
</classpath>
</java>
</target>
Modified: lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl?rev=209293&r1=209292&r2=209293&view=diff
==============================================================================
--- lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl (original)
+++ lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl Tue Jul 5 09:19:18 2005
@@ -96,9 +96,6 @@
<component-instance logger="core.modules.input.workflow" name="workflow"
class="org.apache.lenya.cms.cocoon.components.modules.input.WorkflowModule"/>
- <component-instance logger="core.modules.input.sitetree" name="sitetree"
- class="org.apache.lenya.cms.cocoon.components.modules.input.SitetreeModule"/>
-
<component-instance logger="core.modules.input.fallback" name="fallback"
class="org.apache.lenya.cms.cocoon.components.modules.input.PublicationTemplateFallbackModule">
<directory src="context:///lenya"/>
@@ -434,7 +431,6 @@
<component-instance name="site.paste" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Paste">
<view template="site/paste"/>
</component-instance>
- <component-instance name="site.nudge" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Nudge"/>
<component-instance name="site.archive" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Archive">
<view template="site/archive"/>
</component-instance>
@@ -540,8 +536,6 @@
logger="cron.usecase"/>
<site-managers>
- <component-instance name="tree" logger="lenya.site"
- class="org.apache.lenya.cms.site.tree.TreeSiteManager"/>
<component-instance name="simple" logger="lenya.site"
class="org.apache.lenya.cms.site.simple.SimpleSiteManager"/>
</site-managers>
Modified: lenya/trunk/src/webapp/global-sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/global-sitemap.xmap?rev=209293&r1=209292&r2=209293&view=diff
==============================================================================
--- lenya/trunk/src/webapp/global-sitemap.xmap (original)
+++ lenya/trunk/src/webapp/global-sitemap.xmap Tue Jul 5 09:19:18 2005
@@ -29,13 +29,6 @@
+-->
<map:resources>
- <map:resource name="navigation">
- <map:generate src="lenya/pubs/{pub_id}/content/live/sitetree.xml" />
- <map:transform src="lenya/xslt/util/sitetree2navigation.xsl">
- <map:parameter name="nav_id" value="{nav_id}"/>
- </map:transform>
- </map:resource>
-
<map:resource name="style-cms-page">
<!-- FIXME: due to resolver issues, i18n can currently not be used outside
of a publication IF you do not make a hit into a publication context first.
@@ -255,11 +248,6 @@
<map:mount uri-prefix="menu-xml/{1}/" src="{fallback:menus.xmap}" check-reload="true" reload-method="synchron"/>
</map:match>
- <!-- navigation -->
- <map:match pattern="navigation/**">
- <map:mount uri-prefix="navigation" src="lenya/navigation.xmap" check-reload="true" reload-method="synchron"/>
- </map:match>
-
<!-- Access Control Policies -->
<map:match pattern="*/policies/**">
<map:mount uri-prefix="{1}/policies" src="lenya/pubs/{1}/policies-sitemap.xmap" check-reload="true" reload-method="synchron"/>
@@ -296,13 +284,6 @@
<map:mount uri-prefix="" src="lenya/usecase.xmap" check-reload="true" reload-method="synchron"/>
</map:match>
- <!-- Info area -->
- <map:match pattern="*/*/info-sitetree/**">
- <map:mount uri-prefix="" src="lenya/info.xmap" check-reload="true" reload-method="synchron"/>
- </map:match>
- <map:match pattern="*/info-*/**">
- <map:mount uri-prefix="" src="lenya/info.xmap" check-reload="true" reload-method="synchron"/>
- </map:match>
</map:pipeline>
<map:pipeline>
@@ -414,6 +395,9 @@
<!-- Enter a publet -->
<map:match pattern="publets/*/**">
<map:mount uri-prefix="publets/{1}/" src="lenya/publets/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
+ </map:match>
+ <map:match type="request-parameter" pattern="lenya.publet">
+ <map:mount uri-prefix="" src="lenya/publets/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
</map:match>
<!-- Enter the actual publication -->
Added: lenya/trunk/src/webapp/lenya/pubs/default/lenya/publets/sitetree/xslt/navigation/tabs.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/lenya/publets/sitetree/xslt/navigation/tabs.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/lenya/publets/sitetree/xslt/navigation/tabs.xsl (added)
+++ lenya/trunk/src/webapp/lenya/pubs/default/lenya/publets/sitetree/xslt/navigation/tabs.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: tabs.xsl 189880 2005-06-10 02:36:09Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="nav"
+ >
+
+<xsl:import href="../../../../../../../publets/sitetree/xslt/navigation/tabs.xsl"/>
+
+<xsl:template match="nav:site">
+
+ <div id="tabs">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <xsl:call-template name="pre-separator"/>
+ <xsl:for-each select="nav:node">
+ <xsl:if test="position() > 1">
+ <xsl:call-template name="separator"/>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="@visibleinnav = 'false'"/>
+ <xsl:when test="descendant-or-self::nav:node[@current = 'true']">
+ <xsl:call-template name="tab-selected"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="tab"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:for-each>
+ <xsl:call-template name="post-separator"/>
+ </tr>
+ </table>
+ </div>
+
+</xsl:template>
+
+
+<xsl:template name="tab">
+ <td><div class="tab"><xsl:call-template name="label"/></div></td>
+</xsl:template>
+
+
+<xsl:template name="tab-selected">
+ <td><div class="tab-selected"><xsl:call-template name="label"/></div></td>
+</xsl:template>
+
+
+<xsl:template name="separator">
+ <td><div class="tab-separator"> </div></td>
+</xsl:template>
+
+
+<xsl:template name="pre-separator">
+ <td><div class="tab-pre-separator"> </div></td>
+</xsl:template>
+
+
+<xsl:template name="post-separator">
+ <td class="tab-post-separator"><div class="tab-separator"> </div></td>
+</xsl:template>
+
+
+</xsl:stylesheet>
Added: lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/config/menus/homepage.xsp
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/config/menus/homepage.xsp?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/config/menus/homepage.xsp (added)
+++ lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/config/menus/homepage.xsp Tue Jul 5 09:19:18 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: generic.xsp 155806 2005-03-01 17:55:42Z andreas $ -->
+
+<xsp:page
+ language="java"
+ xmlns:xsp="http://apache.org/xsp"
+ xmlns:xsp-request="http://apache.org/xsp/request/2.0"
+ xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
+ xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
+ xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
+>
+
+ <xsp:structure>
+ <xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
+ <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
+ </xsp:structure>
+
+ <menu>
+
+ <menus>
+ <menu i18n:attr="name" name="Edit">
+ <xsp:logic>
+ String doctype = <input:get-attribute module="page-envelope" as="string" name="document-type"/>;
+ if ("homepage".equals(doctype)) {
+ <block info="false">
+ <item wf:event="edit" uc:usecase="kupu" uc:step="open" href="?"><i18n:text>With Kupu</i18n:text></item>
+ <item wf:event="edit" uc:usecase="edit.bxe" href="?"><i18n:text>With BXE</i18n:text></item>
+ <item wf:event="edit" uc:usecase="edit.forms"><xsp:attribute name="href"><xsp:expr>"?form=" + doctype</xsp:expr></xsp:attribute><i18n:text>With Forms</i18n:text></item>
+ <item wf:event="edit" uc:usecase="edit.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
+ </block>
+ }
+ </xsp:logic>
+ </menu>
+
+ </menus>
+
+ </menu>
+</xsp:page>
Added: lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/config/publet.xconf
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/config/publet.xconf?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/config/publet.xconf (added)
+++ lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/config/publet.xconf Tue Jul 5 09:19:18 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: doctypes.xconf 164635 2005-04-25 20:01:43Z tschlabach $ -->
+
+<xconf xpath="/cocoon/resource-types" unless="/cocoon/resource-types/component-instance[@name = 'homepage']">
+
+ <component-instance name="homepage"
+ logger="lenya.resourcetypes.homepage"
+ class="org.apache.lenya.cms.publication.ResourceTypeImpl">
+ <schema src="fallback://lenya/resources/schemas/homepage.rng"/>
+ <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator">
+ <sample-name>homepage.xml</sample-name>
+ </creator>
+ <link-attribute xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@href"/>
+ </component-instance>
+
+</xconf>
Added: lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/menus.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/menus.xmap?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/menus.xmap (added)
+++ lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/menus.xmap Tue Jul 5 09:19:18 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: menus.xmap 178738 2005-05-27 03:42:09Z gregor $ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:pipelines>
+
+ <map:pipeline>
+
+ <map:match pattern="**">
+ <map:generate type="serverpages" src="config/menus/homepage.xsp"/>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ </map:pipeline>
+
+ </map:pipelines>
+</map:sitemap>
Added: lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/samples/homepage.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/samples/homepage.xml?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/samples/homepage.xml (added)
+++ lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/samples/homepage.xml Tue Jul 5 09:19:18 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
+>
+ <head>
+ <title>Default Publication</title>
+ </head>
+ <body>
+ <h1>Default Publication</h1>
+ <p>Welcome to the default Lenya publication!</p>
+ <p>The purpose of this publication is</p>
+ <ul>
+ <li>to show beginners the basic functionality of the Lenya CMS,</li>
+ <li>to provide an "out of the box" publication that can be easily adapted and used, and</li>
+ <li>to provide a basis for reference implementations of new concepts and best practices.</li>
+ </ul>
+ <p>
+ You won't find any fancy and confusing bells and whistles here, but the
+ publication contains everything you need to get started.
+ </p>
+ </body>
+</html>
Added: lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/sitemap.xmap?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/sitemap.xmap (added)
+++ lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/sitemap.xmap Tue Jul 5 09:19:18 2005
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: doctypes.xmap 179488 2005-06-02 02:29:39Z gregor $ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:pipelines>
+
+ <map:pipeline>
+ <!-- View Revision? -->
+ <map:match pattern="*.xml">
+ <map:match type="step" pattern="view-revision">
+ <map:generate type="serverpages" src="../../content/rc/view.xsp">
+ </map:generate>
+ <map:transform src="../../xslt/rc/toDoc.xsl"/>
+ <map:transform src="fallback://lenya/publets/homepage/xslt/homepage2xhtml.xsl">
+ <map:parameter name="rendertype" value="{1}"/>
+ <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
+ <map:parameter name="language" value="{page-envelope:document-language}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:match>
+
+ <!-- parametrized doctype matcher -->
+ <!-- pattern="{rendertype}" -->
+ <map:match pattern="*.xml">
+ <map:generate src="../../pubs/{page-envelope:publication-id}/content/{page-envelope:area}/{page-envelope:document-path}"/>
+ <map:transform src="fallback://lenya/publets/homepage/xslt/homepage2xhtml.xsl">
+ <map:parameter name="rendertype" value="{1}"/>
+ <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
+ <map:parameter name="language" value="{page-envelope:document-language}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ </map:pipeline>
+
+ </map:pipelines>
+</map:sitemap>
Added: lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/xslt/homepage2xhtml.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/xslt/homepage2xhtml.xsl?rev=209293&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/xslt/homepage2xhtml.xsl (added)
+++ lenya/trunk/src/webapp/lenya/pubs/default/publets/homepage/xslt/homepage2xhtml.xsl Tue Jul 5 09:19:18 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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 version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+
+<xsl:import href="fallback://lenya/publets/xhtml/xslt/xhtml2xhtml.xsl"/>
+
+</xsl:stylesheet>
Modified: lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap?rev=209293&r1=209292&r2=209293&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap (original)
+++ lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap Tue Jul 5 09:19:18 2005
@@ -111,10 +111,10 @@
<!-- /lenyabody-{rendertype}/{publication-id}/{area}/{doctype}/{url} -->
<map:match pattern="lenyabody-*/*/*/*/**">
<map:aggregate element="cmsbody">
- <map:part src="cocoon://navigation/{2}/{3}/breadcrumb/{5}.xml"/>
- <map:part src="cocoon://navigation/{2}/{3}/tabs/{5}.xml"/>
- <map:part src="cocoon://navigation/{2}/{3}/menu/{5}.xml"/>
- <map:part src="cocoon://navigation/{2}/{3}/search/{5}.xml"/>
+ <map:part src="cocoon://publets/sitetree/{2}/{3}/breadcrumb/{5}.xml"/>
+ <map:part src="cocoon://publets/sitetree/{2}/{3}/tabs/{5}.xml"/>
+ <map:part src="cocoon://publets/sitetree/{2}/{3}/menu/{5}.xml"/>
+ <map:part src="cocoon://publets/sitetree/{2}/{3}/search/{5}.xml"/>
<map:part src="cocoon://publets/{page-envelope:document-type}/{1}.xml"/>
</map:aggregate>
<map:transform src="fallback://xslt/page2xhtml-{4}.xsl">
Modified: lenya/trunk/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.prx
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.prx?rev=209293&r1=209292&r2=209293&view=diff
==============================================================================
Binary files /tmp/tmp6d5JbB and /tmp/tmpQjRLPN differ
Modified: lenya/trunk/src/webapp/lenya/usecases/tab/head.jx
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/usecases/tab/head.jx?rev=209293&r1=209292&r2=209293&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/usecases/tab/head.jx (original)
+++ lenya/trunk/src/webapp/lenya/usecases/tab/head.jx Tue Jul 5 09:19:18 2005
@@ -29,8 +29,8 @@
<jx:set var="area" value="${usecase.getParameter('document').getArea()}"/>
<jx:set var="language" value="${usecase.getParameter('document').getLanguage()}"/>
<jx:set var="incrementalLoading" value="${'false'}"/>
- <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/ua.js"/>
- <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/tree.js"/>
- <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/sitetree.js?language=${language}&incremental=${incrementalLoading}"/>
+ <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/ua.js?lenya.publet=sitetree"/>
+ <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/tree.js?lenya.publet=sitetree"/>
+ <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/sitetree.js?lenya.publet=sitetree&language=${language}&incremental=${incrementalLoading}"/>
</page:head>
</jx:template>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org