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 2009/03/19 22:37:15 UTC

svn commit: r756222 - in /lenya/contributions/2_0_X/modules: atom/ atom/test/canoo/ atom/xslt/ xhtmlfiredocs/ xhtmlfiredocs/config/ xhtmlfiredocs/config/cocoon-xconf/ xhtmlfiredocs/resources/ xhtmlfiredocs/resources/editing/ xhtmlfiredocs/resources/i18...

Author: andreas
Date: Thu Mar 19 21:37:14 2009
New Revision: 756222

URL: http://svn.apache.org/viewvc?rev=756222&view=rev
Log:
Adding xhtmlfiredocs module, fixing some issues in atom module.

Added:
    lenya/contributions/2_0_X/modules/atom/xslt/translate-xsl-includes.xsl
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/cocoon-xconf/
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/cocoon-xconf/resourcetype-xhtmlfiredocs.xconf
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/menu.xml
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/module.xml
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/editing/
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/editing/inserts.xml
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui.xml
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui_de.xml
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/sitemap.xmap
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl
Modified:
    lenya/contributions/2_0_X/modules/atom/sitemap.xmap
    lenya/contributions/2_0_X/modules/atom/test/canoo/test.xml

Modified: lenya/contributions/2_0_X/modules/atom/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/atom/sitemap.xmap?rev=756222&r1=756221&r2=756222&view=diff
==============================================================================
--- lenya/contributions/2_0_X/modules/atom/sitemap.xmap (original)
+++ lenya/contributions/2_0_X/modules/atom/sitemap.xmap Thu Mar 19 21:37:14 2009
@@ -58,7 +58,7 @@
       </map:match>
       
       <map:match type="usecase" pattern="atom.inserts">
-        <map:read mime-type="application/xml" src="lenya-document:?format=editingInserts"/>
+        <map:read mime-type="application/xml" src="{resource-type:format-editingInserts}"/>
       </map:match>
       
       <map:match type="usecase" pattern="atom.uuid2url">
@@ -91,7 +91,7 @@
       
       <map:match pattern="**.xsl">
         <map:generate src="fallback://lenya/{1}.xsl" mime-type="application/xslt+xml"/>
-        <map:transform src="fallback://lenya/modules/firedocs/xslt/translate-xsl-includes.xsl"/>
+        <map:transform src="fallback://lenya/modules/atom/xslt/translate-xsl-includes.xsl"/>
         <map:transform type="proxy-xsl"/>
         <map:serialize type="xml"/>
       </map:match>

Modified: lenya/contributions/2_0_X/modules/atom/test/canoo/test.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/atom/test/canoo/test.xml?rev=756222&r1=756221&r2=756222&view=diff
==============================================================================
--- lenya/contributions/2_0_X/modules/atom/test/canoo/test.xml (original)
+++ lenya/contributions/2_0_X/modules/atom/test/canoo/test.xml Thu Mar 19 21:37:14 2009
@@ -71,6 +71,8 @@
   <property name="contentFileInvalid" value="${moduleDir}/test/canoo/resources/conceptsInvalid.html"/>
   <property name="contentMimeType" value="application/xhtml+xml"/>
   
+  <property name="schemaUri" value="/${pubId}/modules/xhtml/schemas/xhtml.rng"/>
+  
   <target name="wt.testInWork" depends="
     atom.setup,
     atom.entry,
@@ -114,8 +116,8 @@
         
         <invoke url="${entryUrl}"/>
         <verifyResponseCode code="200"/>
-        <storeXPath property="schemaUri" xpath="/atom:entry/edit:edit/edit:schema/@href"/>
-        <verifyProperty name="schemaUri" text="/${pubId}/modules/xhtml/schemas/xhtml.rng"/>
+        <storeXPath property="schemaUriValue" xpath="/atom:entry/edit:edit/edit:schema/@href"/>
+        <verifyProperty name="schemaUriValue" text="${schemaUri}"/>
         <storeXPath property="uuid2urlUri" xpath="/atom:entry/edit:edit/edit:uri-resolver[@protocol = 'lenya-document']/@href"/>
         <storeXPath property="lenyaDocumentUri" xpath="/atom:entry/atom:content/@src"/>
         
@@ -123,7 +125,7 @@
         <verifyResponseCode code="200"/>
         <verifyXPath xpath="/relaxng:grammar"/>
         
-        <invoke url="${uuid2urlUri}${lenyaDocumentUri}"/>
+        <invoke url="#{uuid2urlUri}#{lenyaDocumentUri}"/>
         <verifyResponseCode code="200"/>
         
         <doLogout/>

Added: lenya/contributions/2_0_X/modules/atom/xslt/translate-xsl-includes.xsl
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/atom/xslt/translate-xsl-includes.xsl?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/atom/xslt/translate-xsl-includes.xsl (added)
+++ lenya/contributions/2_0_X/modules/atom/xslt/translate-xsl-includes.xsl Thu Mar 19 21:37:14 2009
@@ -0,0 +1,43 @@
+<?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.
+-->
+
+
+<!-- FIXME: this file should be killed the sooner the better.
+     There is really no excuse to re-invent a fallback source resolver with substring guessing.
+-->
+
+
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:i="http://apache.org/cocoon/include/1.0"
+    >
+  
+  <xsl:template match="@href[starts-with(.,'fallback://lenya/')]">
+    <xsl:attribute name="href">
+      <xsl:text>/modules/firedocs</xsl:text>
+      <xsl:value-of select="substring-after(., 'fallback://lenya')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+</xsl:stylesheet> 

Added: lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/cocoon-xconf/resourcetype-xhtmlfiredocs.xconf
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/cocoon-xconf/resourcetype-xhtmlfiredocs.xconf?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/cocoon-xconf/resourcetype-xhtmlfiredocs.xconf (added)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/cocoon-xconf/resourcetype-xhtmlfiredocs.xconf Thu Mar 19 21:37:14 2009
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<xconf xpath="/cocoon/resource-types" unless="/cocoon/resource-types/component-instance[@name = 'xhtmlfiredocs']">
+  
+  <component-instance name="xhtmlfiredocs"
+    logger="lenya.resourcetypes.xhtmlfiredocs"
+    class="org.apache.lenya.cms.publication.ResourceTypeImpl">
+    <schema 
+      namespace="http://relaxng.org/ns/structure/0.9"
+      uri="fallback://lenya/modules/xhtml/resources/schemas/xhtml.rng"/>
+    
+    <!-- Default time in seconds until the resource-type has expired -->  
+    <expires seconds="3600" />
+    
+    <samples uri="fallback://lenya/modules/xhtml/samples/samples.xml"/>
+    
+    <link-attribute xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@href"/>
+    <link-attribute xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@data"/>
+    <link-attribute xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@src"/>
+    <format name="xhtml" uri="cocoon://modules/xhtmlfiredocs/xhtml.xml"/>
+    <format name="webdavGET" uri="cocoon://modules/xhtmlfiredocs/davget.xml"/>
+    <format name="luceneIndex" uri="cocoon://modules/xhtml/lucene-index"/>
+    <!-- "xslt-clean" format is used by webDAV (and other editors?) to "clean" xml content before it is validated/saved --> 
+    <format name="xslt-clean" uri="fallback://lenya/modules/xhtml/xslt/clean-xhtml.xsl"/>
+    <format name="icon" uri="cocoon://modules/xhtml/icon"/>
+    <format name="xhtml.xsl" uri="/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl"/>
+    <format name="editingInserts" uri="fallback://lenya/modules/xhtmlfiredocs/resources/editing/inserts.xml"/>
+    
+  </component-instance>
+  
+</xconf>

Added: lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/menu.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/menu.xml?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/menu.xml (added)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/menu.xml Thu Mar 19 21:37:14 2009
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+  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: generic.xsp 155806 2005-03-01 17:55:42Z andreas $ -->
+
+<menu xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
+  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
+  xmlns="http://apache.org/cocoon/lenya/menubar/1.0">
+  
+  <menus>
+    <menu i18n:attr="name" name="File">
+      <block areas="site authoring" id="create">
+        <item uc:usecase="sitemanagement.create" href="?doctype=xhtmlfiredocs"><i18n:translate>
+          <i18n:text>New ... Document</i18n:text>
+          <i18n:param><i18n:text>resourceType-xhtmlfiredocs</i18n:text></i18n:param>
+        </i18n:translate>
+        </item>
+      </block>
+    </menu>
+    
+    <menu i18n:attr="name" name="Edit">
+      <block areas="authoring" resourceTypes="xhtmlfiredocs">
+        <item uc:usecase="bxe.edit"><i18n:text>With BXE</i18n:text></item>
+        <item uc:usecase="editors.oneform"><i18n:text>Edit Source</i18n:text></item>
+      </block>
+    </menu>
+    
+  </menus>
+  
+</menu>

Added: lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/module.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/module.xml?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/module.xml (added)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/config/module.xml Thu Mar 19 21:37:14 2009
@@ -0,0 +1,26 @@
+<?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.
+-->
+
+<module xmlns="http://apache.org/lenya/module/1.0">
+  <id>org.apache.lenya.modules.xhtmlfiredocs</id>
+  <package>org.apache.lenya.modules</package>
+  <version>0.1-dev</version>
+  <name>XHTML Firedocs</name>
+  <lenya-version>@lenya.version@</lenya-version>
+  <description>XHTML resource type with support for the Firedocs editor</description>
+</module>

Added: lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/editing/inserts.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/editing/inserts.xml?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/editing/inserts.xml (added)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/editing/inserts.xml Thu Mar 19 21:37:14 2009
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <contentBlocks
+  xmlns="http://www.firedocs.org/contentblocks/1.0"
+  xmlns:cb="http://www.firedocs.org/contentblocks/1.0"
+  xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns:ukf="http://www.ukl.uni-freiburg.de/lenya/document/1.0">
+
+  <contentBlock title="Tabelle (4x4)" context="//xhtml:body">
+    <xhtml:table border="1" width="100%">
+      <xhtml:tr>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+      </xhtml:tr>
+      <xhtml:tr>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+      </xhtml:tr>
+      <xhtml:tr>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+      </xhtml:tr>
+      <xhtml:tr>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+        <xhtml:td> </xhtml:td>
+      </xhtml:tr>
+    </xhtml:table>
+  </contentBlock>
+
+
+  <!-- nested blocks (not implemented yet) -->
+  <!--
+  <contentBlock title="Some Block" name="container" context="//">
+    <xhtml:p>
+      <repeat minOccurance="0" maxOccurance="5">
+        <include ref="nestedBlock"/>
+      </repeat>
+    </xhtml:p>
+  </contentBlock>
+
+  <contentBlock title="A nested Block" name="nestedBlock">
+    Some text
+  </contentBlock>
+  --> 
+
+  <!--  
+  <insertObject>
+    <xhtml:object cb:contentType="type" cb:title="." cb:href="data">
+      A Default Title
+    </xhtml:object>
+  </insertObject>
+
+  <insertObject contentType="video/quicktime">
+    <xhtml:object type="video/quicktime" cb:href="data" width="320" height="260">
+      <xhtml:param name="controller" value="true" />
+        Error text.
+    </xhtml:object>
+  </insertObject>
+
+  <insertObject contentType="video/mpeg">
+    <xhtml:object type="video/mpeg" cb:href="data" width="320" height="260">
+      <xhtml:param name="controller" value="true" />
+        Error text.
+    </xhtml:object>
+  </insertObject>
+
+  <insertObject contentType="video/mp4">
+    <xhtml:object type="video/quicktime" cb:href="data" width="320" height="260">
+      <xhtml:param name="controller" value="true" />
+        Error text.
+    </xhtml:object>
+  </insertObject>
+
+  <insertObject contentType="video/x-ms-wmv">
+    <xhtml:object type="video/x-ms-wmv" cb:href="data" width="320" height="260">
+      <xhtml:param name="controller" value="true" />
+        Error text.
+    </xhtml:object>
+  </insertObject>
+
+    <insertObject contentType="application/x-shockwave-flash">
+    <xhtml:object type="application/x-shockwave-flash" cb:href="data" width="425" height="344">
+      <xhtml:param name="movie" cb:href="value"/>
+      <xhtml:param name="allowFullScreen" value="true"/>
+    </xhtml:object>
+  </insertObject>
+  -->
+
+  <insertAttachment>
+    <xhtml:a class="lenya.asset" cb:href="href" cb:title=".">A Title</xhtml:a>
+  </insertAttachment>
+  
+</contentBlocks>
+

Added: lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui.xml?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui.xml (added)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui.xml Thu Mar 19 21:37:14 2009
@@ -0,0 +1,26 @@
+<?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: cmsui.xml 446564 2006-09-15 10:13:16Z andreas $ -->
+
+<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns="http://apache.org/cocoon/i18n/2.1">
+
+  <message key="resourceType-xhtmlfiredocs">XHTML for Firedocs</message>
+  
+</catalogue>

Added: lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui_de.xml
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui_de.xml?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui_de.xml (added)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/resources/i18n/cmsui_de.xml Thu Mar 19 21:37:14 2009
@@ -0,0 +1,26 @@
+<?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: cmsui.xml 446564 2006-09-15 10:13:16Z andreas $ -->
+
+<catalogue xml:lang="de" xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns="http://apache.org/cocoon/i18n/2.1">
+
+  <message key="resourceType-xhtmlfiredocs">XHTML für Firedocs</message>
+  
+</catalogue>

Added: lenya/contributions/2_0_X/modules/xhtmlfiredocs/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/xhtmlfiredocs/sitemap.xmap?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/sitemap.xmap (added)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/sitemap.xmap Thu Mar 19 21:37:14 2009
@@ -0,0 +1,84 @@
+<?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: doctypes.xmap 179488 2005-06-02 02:29:39Z gregor $ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+<!-- =========================== Components ================================ -->
+
+  <map:components>
+  
+    <map:serializers default="xhtml"> 
+      <map:serializer name="xml-get" src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/xml">
+        <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
+        <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
+        <encoding>UTF-8</encoding>
+      </map:serializer>
+    </map:serializers>
+ 
+  </map:components>
+
+  <map:pipelines>
+
+    <map:pipeline>
+
+      <!-- webdav GET matcher -->
+      <map:match pattern="davget.xml">
+        <map:act type="set-header">
+          <map:parameter name="Last-Modified" value="{date-iso8601-rfc822:{page-envelope:document-lastmodified}}" />
+          <map:generate src="lenya-document:{page-envelope:document-uuid},lang={page-envelope:document-language}"/>
+          <map:transform type="uuid2url"/>
+          <map:transform type="proxy">
+            <map:parameter name="urls" value="absolute"/>
+          </map:transform>
+          <map:serialize type="xml-get"/>
+        </map:act>
+      </map:match>
+
+      <!-- parametrized doctype matcher -->
+      <!-- pattern="{format}.xml" -->
+      <map:match pattern="*.xml">
+        <map:generate src="cocoon:/{1}.xml/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-uuid}/{page-envelope:document-language}"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+      <!-- {format}.xml/{pubId}/{area}/{uuid}/{language} -->
+      <map:match pattern="*.xml/*/*/*/*">
+        <map:generate src="lenya-document:{4},pub={2},area={3},lang={5}{link:rev}"/>
+        <map:transform src="fallback://lenya/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2{1}.xsl">
+          <map:parameter name="rendertype" value="{request-param:rendertype}"/>
+          <map:parameter name="nodeid" value="{doc-info:{2}:{3}:{4}:{5}:nodeName}"/>
+          <map:parameter name="language" value="{4}"/>
+        </map:transform>
+        <map:transform type="include"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="icon/*/*/*/*">
+        <map:read src="fallback://lenya/modules/xhtml/resources/icons/xhtml.gif"/>
+      </map:match>
+      
+      <map:match pattern="icon">
+        <map:read src="fallback://lenya/modules/xhtml/resources/icons/xhtml.gif" mime-type="image/gif"/>
+      </map:match>
+
+    </map:pipeline>
+    
+  </map:pipelines>
+</map:sitemap>

Added: lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl?rev=756222&view=auto
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl (added)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl Thu Mar 19 21:37:14 2009
@@ -0,0 +1,87 @@
+<?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: xhtml2xhtml.xsl 201776 2005-06-25 18:25:26Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:ci="http://apache.org/cocoon/include/1.0" 
+  exclude-result-prefixes="xhtml lenya"
+  >
+  
+  <xsl:param name="rendertype" select="''"/>
+  <xsl:param name="nodeid"/>
+  <xsl:param name="editor"/>
+  
+  <xsl:template match="/xhtml:html">
+        <div id="body">
+          <xsl:if test="$rendertype = 'edit'">
+            <xsl:attribute name="bxe_xpath">/xhtml:html/xhtml:body</xsl:attribute>
+          </xsl:if>
+          <xsl:apply-templates select="xhtml:body/node()"/>
+        </div>
+  </xsl:template>
+
+
+  <xsl:template match="xhtml:body">
+    <body>
+      <xsl:apply-templates select="@*|node()"/>
+    </body> 
+  </xsl:template>
+  
+  
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+  <xsl:template name="substring-after-last">
+    <xsl:param name="input"/>
+    <xsl:param name="substr"/>
+    <xsl:variable name="temp" select="substring-after($input, $substr)"/>
+    <xsl:choose>
+      <xsl:when test="$substr and contains($temp, $substr)">
+        <xsl:call-template name="substring-after-last">
+          <xsl:with-param name="input" select="$temp"/>
+          <xsl:with-param name="susbtr" select="$substr"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$temp"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+  <xsl:template match="xhtml:a[@class = 'lenya.asset']">
+    <xsl:choose>
+      <xsl:when test="$editor = 'firedocs'">
+        <xsl:copy>
+          <xsl:apply-templates select="@*|node()"/>
+        </xsl:copy>
+      </xsl:when>
+      <xsl:otherwise>
+        <ci:include src="{@href}?format=downloadLink"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+</xsl:stylesheet> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org