blob: fc72e18bf864602af2a20d009f26c3dbd14d0c48 [file] [log] [blame]
<?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: sitemap.xmap 423198 2006-07-18 18:52:43Z chestnut $ -->
<!--
Kupu usecase sitemaps. Integrates the Kupu editor (http://kupu.oscom.org/) into Lenya.
Most matchers serve as callbacks for Kupu running in a client's browser.
Make sure that Kupu is installed under lenya/resources/kupu.
Most of (re)sources used in generators and transfomers of this sitemap
are located in the Kupu distribution.
Enjoy using Kupu.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<!-- =========================== Components ================================ -->
<map:components/>
<!-- =========================== Resources ================================= -->
<map:resources>
<map:resource name="style-cms-page">
<map:transform type="i18n">
<map:parameter name="locale" value="{request:locale}"/>
</map:transform>
<map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl">
<map:parameter name="contextprefix" value=""/>
</map:transform>
<map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
</map:resource>
</map:resources>
<!-- =========================== Flow ===================================== -->
<map:flow language="javascript">
<map:script src="kupu.js"/>
<map:script src="fallback://lenya/modules/usecase/edit-document.js"/>
</map:flow>
<!-- =========================== Pipelines ================================ -->
<map:pipelines>
<map:component-configurations>
<global-variables>
<resourceIconUrl>/modules/kupu/kupu/apache-lenya/lenya/images/right_arrow.png</resourceIconUrl>
<imageBase>/modules/kupu/kupu/apache-lenya/lenya/images</imageBase>
</global-variables>
</map:component-configurations>
<map:pipeline internal-only="true">
<map:match pattern="kupu-stream">
<map:generate type="stream"/>
<map:serialize type="xml"/>
</map:match>
<!-- Flow callbacks -->
<map:match pattern="sitetree_link_library_template">
<map:generate src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/drawers/sitetree_link_library.xml.jx" type="jx">
<map:parameter name="resource-icon-url" value="{proxy:{global:resourceIconUrl}}"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="publication_image_library_template">
<map:generate src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/drawers/publication_image_library.xml.jx" type="jx">
<map:parameter name="resource-icon-url" value="{proxy:{global:resourceIconUrl}}"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="request2document">
<map:aggregate element="edit-envelope">
<map:part element="edited" src="cocoon:/kupu-stream"/>
<map:part element="original"
src="lenya-document:{page-envelope:document-uuid},lang={page-envelope:document-language}"/>
</map:aggregate>
<map:transform src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/kupusave.xsl"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="kupu.open">
<map:generate
src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/kupu/kupumacros.html"/>
<map:transform src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/kupumacros.xsl">
<map:parameter name="contentfile"
value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=content"/>
<map:parameter name="context-prefix" value="/{page-envelope:publication-id}/modules/kupu"/>
<!-- Only used to display the document path of the edited doc -->
<map:parameter name="document-path" value="&quot;{dublincore:title}&quot;"/>
<map:parameter name="save-destination" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.event=edit"/>
<map:parameter name="exit-destination" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=exit"/>
<map:parameter name="reload-after-save" value="1"/>
<map:parameter name="use-css" value="1"/>
<map:parameter name="imagedrawer-xsl-uri"
value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=imagedrawerxsl"/>
<map:parameter name="linkdrawer-xsl-uri"
value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=linkdrawerxsl"/>
<map:parameter name="image-libraries-uri"
value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=image_libraries"/>
<map:parameter name="link-libraries-uri"
value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=link_libraries"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
<!-- Requested by Kupu to load the document into the editor -->
<map:match pattern="content" type="step">
<map:match pattern="*/authoring/**">
<map:generate src="lenya-document:{page-envelope:document-uuid},lang={page-envelope:document-language}"/>
<map:transform
src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/content2edit.xsl">
<map:parameter name="css" value="/{1}/authoring/css/page.css"/>
<map:parameter name="nodeid" value="{page-envelope:document-name}"/>
</map:transform>
<map:transform type="uuid2url"/>
<map:transform type="proxy">
<map:parameter name="urls" value="absolute"/>
</map:transform>
<map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
<map:serialize type="xhtml"/>
</map:match>
</map:match>
<!-- Kupu Image Drawer -->
<map:match pattern="*drawerxsl" type="step">
<map:generate type="jx" src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/drawers/{1}drawer.xsl">
<!-- We need to use the hole uri scheme i.e. http://servername:port/, since IE xslt processor
throws an access violation upon loading of xslts from the internet.
This requires to configure the proxy accordingly in publication.xml.
-->
<map:parameter name="import-stylesheet-url"
value="{proxy:/modules/kupu/kupu/common/kupudrawers/drawer.xsl}"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="image_libraries" type="step">
<map:generate src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/drawers/imagelibraries.xml.jx" type="jx">
<map:parameter name="pubLibUrl" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=publication_image_library"/>
<map:parameter name="pageLibUrl" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=page_image_library"/>
<map:parameter name="imageBaseUrl" value="{proxy:{global:imageBase}}"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="link_libraries" type="step">
<map:generate src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/drawers/linklibraries.xml.jx" type="jx">
<map:parameter name="pubLibUrl" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=sitetree_link_library"/>
<map:parameter name="pageLibUrl" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}}?lenya.module=kupu&amp;lenya.step=other_link_library"/>
<map:parameter name="imageBaseUrl" value="{proxy:{global:imageBase}}"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="page_image_library" type="step">
<map:call function="publication_image_library">
<map:parameter name="template" value="publication_image_library_template"/>
<map:parameter name="iconUrl" value="{proxy:{global:resourceIconUrl}}"/>
<map:parameter name="rootPath" value=""/>
<map:parameter name="baseUrl" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}}"/>
</map:call>
</map:match>
<map:match pattern="sitetree_link_library" type="step">
<map:call function="sitetree_link_library"/>
</map:match>
<map:match pattern="publication_image_library" type="step">
<map:call function="publication_image_library">
<map:parameter name="template" value="publication_image_library_template"/>
<map:parameter name="iconUrl" value="{proxy:{global:resourceIconUrl}}"/>
<map:parameter name="rootPath" value="{page-envelope:document-path}"/>
<map:parameter name="baseUrl" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}}"/>
</map:call>
</map:match>
<map:match pattern="*_library" type="step">
<map:generate src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/drawers/{1}_library.xml.jx" type="jx"/>
<map:serialize type="xml"/>
</map:match>
<!-- /Kupu Image Drawer -->
<!-- Checkin document on exit and trigger workflow -->
<map:match pattern="exit" type="step">
<map:act type="reserved-checkin">
<map:generate src="fallback://lenya/content/rc/{exception}.xsp" type="serverpages">
<map:parameter name="user" value="{user}"/>
<map:parameter name="filename" value="{filename}"/>
<map:parameter name="checkType" value="{checkType}"/>
<map:parameter name="date" value="{date}"/>
<map:parameter name="message" value="{message}"/>
</map:generate>
<map:transform src="fallback://lenya/xslt/rc/rco-exception.xsl"/>
<map:call resource="style-cms-page"/>
<map:serialize />
</map:act>
<map:redirect-to uri="{proxy:/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-path}.html}"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>