svn commit: r760841 - in /lenya/contributions/2_0_X: modules/xhtmlfiredocs/xslt/ pubs/defaultfiredocs/modules/defaultstyle/ pubs/defaultfiredocs/modules/defaultstyle/xslt/

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Wed Apr  1 10:16:07 2009
New Revision: 760841

URL: http://svn.apache.org/viewvc?rev=760841&view=rev
Log:
Use separate page context for Firedocs.

Added:
    lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.xsl
Modified:
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl
    lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/sitemap.xmap
    lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/page.xsl

Modified: 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=760841&r1=760840&r2=760841&view=diff
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl (original)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl Wed Apr  1 10:16:07 2009
@@ -32,28 +32,15 @@
   <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>
+    <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"/>
@@ -71,6 +58,7 @@
     </xsl:choose>
   </xsl:template>
   
+  
   <xsl:template match="xhtml:a[@class = 'lenya.asset']">
     <xsl:choose>
       <xsl:when test="$editor = 'firedocs'">
@@ -84,4 +72,12 @@
     </xsl:choose>
   </xsl:template>
   
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+  
 </xsl:stylesheet> 

Modified: lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/sitemap.xmap?rev=760841&r1=760840&r2=760841&view=diff
==============================================================================
--- lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/sitemap.xmap (original)
+++ lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/sitemap.xmap Wed Apr  1 10:16:07 2009
@@ -210,6 +210,12 @@
         </map:act>
         
         <map:generate src="cocoon:/{1}/{2}.{3}.pageContext"/>
+        <map:transform src="xslt/includeDocument.xsl">
+          <map:parameter name="pub" value="{page-envelope:publication-id}"/>
+          <map:parameter name="area" value="{page-envelope:area}"/>
+          <map:parameter name="uuid" value="{page-envelope:document-uuid}"/>
+          <map:parameter name="language" value="{page-envelope:language}"/>
+        </map:transform>
         <map:transform type="include"/>
         <map:transform type="uuid2url"/>
         

Added: lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.xsl
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.xsl?rev=760841&view=auto
==============================================================================
--- lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.xsl (added)
+++ lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.xsl Wed Apr  1 10:16:07 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:i="http://apache.org/cocoon/include/1.0"
+  >
+  
+  <xsl:param name="pub"/>  
+  <xsl:param name="area"/> 
+  <xsl:param name="uuid"/>
+  <xsl:param name="language"/>
+  
+  <xsl:template match="xi:include">
+    <i:include src="lenya-document:{$uuid},pub={$pub},area={$area},lang={$language}?format=xhtml">
+      <i:fallback>
+        <p>
+          This document doesn't exist.
+        </p>
+      </i:fallback>
+    </i:include>
+  </xsl:template>
+  
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

Modified: lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/page.xsl
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/page.xsl?rev=760841&r1=760840&r2=760841&view=diff
==============================================================================
--- lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/page.xsl (original)
+++ lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/page.xsl Wed Apr  1 10:16:07 2009
@@ -93,6 +93,8 @@
                   <xsl:call-template name="searchForm"/>
                   
                   <div id="content">
+                    <xi:include href="#" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+                    <!--
                     <i:include src="cocoon:/{$pub}/{$area}/{$uuid}/{$language}.content">
                       <i:fallback>
                         <p>
@@ -100,6 +102,7 @@
                         </p>
                       </i:fallback>
                     </i:include>
+                    -->
                   </div>
                   
                   <xsl:call-template name="footer"/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.