blob: 002a38ce813f2fd181d57adc8121043d125bbc52 [file] [log] [blame]
<?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.
-->
<!-- $Id: usecase-bxe.xmap 345495 2005-11-18 15:11:30Z chestnut $ -->
<!--
This sitemap handles the interaction between the Bitflux Editor and Lenya
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<!-- =========================== 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:transform src="context://lenya/xslt/util/strip_namespaces.xsl"/>
</map:resource>
<map:resource name="cms-screen-xml">
<map:generate src="fallback://lenya/content/{serverpage}" type="serverpages"/>
<map:transform src="fallback://lenya/xslt/{stylesheet}">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
</map:resource>
<map:resource name="cms-screen">
<map:call resource="cms-screen-xml">
<map:parameter name="serverpage" value="{serverpage}"/>
<map:parameter name="stylesheet" value="{stylesheet}"/>
</map:call>
<map:call resource="style-cms-page"/>
<map:serialize />
</map:resource>
</map:resources>
<!-- =========================== Flow ===================================== -->
<map:flow language="javascript">
<map:script src="fallback://lenya/usecases/edit-document.js"/>
<map:script src="fallback://lenya/modules/bxe/usecases/bxe.js"/>
</map:flow>
<!-- =========================== Pipelines ================================ -->
<map:pipelines>
<map:pipeline type="noncaching">
<map:match pattern="bxe.close">
<map:act type="reserved-checkin">
<map:generate type="serverpages" src="fallback://lenya/content/rc/{exception}.xsp">
<map:parameter name="user" value="{user}"/>
<map:parameter name="filename" value="{filename}"/>
<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:match pattern="*/*/**.html">
<!--+
| Build the BXE configuration
+-->
<map:match type="step" pattern="config">
<map:select type="resource-exists">
<map:when test="fallback://lenya/modules/{page-envelope:document-type}/config/bxe.xml">
<map:generate src="fallback://lenya/modules/{page-envelope:document-type}/config/bxe.xml"/>
</map:when>
<map:otherwise>
<map:generate src="fallback://lenya/modules/bxe/resources/misc/inc/config.xml"/>
</map:otherwise>
</map:select>
<map:transform src="fallback://lenya/modules/bxe/xslt/config-xml.xsl">
<!-- Parameter BX_xmlfile:
defines the Lenya URL with which BXE interacts, to
1. get the document contents (by issuing a GET to this URL),
2. save the changed contents (by issuing a PUT to this URL)
-->
<map:parameter name="BX_xmlfile" value="{proxy:/{../1}/{../2}/{../3}.xml}?lenya.module=webdav&amp;lenya.event=edit"/>
<map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
<!-- Instead of an xsl we use the xhtml file to provide the basic layout
<map:parameter name="BX_xslfile" value="{2}.xsl"/>
-->
<map:parameter name="BX_xhtmlfile" value="{proxy:/{../1}/{../2}/{../3}.bxe.html}?rendertype=edit"/>
<map:parameter name="BX_validationfile" value="{proxy:{resource-type:httpSchemaUri}}"/>
<map:parameter name="css" value="{proxy:/lenya/css/default.css}"/>
<!-- The document is checked in when we exit from bx (in case of save&exit and in case of exit), so we use the usecase
for the checkin while we redirect to the document
-->
<map:parameter name="BX_exitdestination" value="{proxy:/{../1}/{../2}/{../3}.html}?lenya.usecase=bxe.close"/>
<map:parameter name="contextmenufile" value="fallback://lenya/modules/bxe/resources/misc/contextmenu.xml"/>
</map:transform>
<map:transform type="cinclude"/>
<map:serialize type="xml"/>
</map:match>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>