svn commit: r765614 - in /lenya/contributions/2_0_X: modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl pubs/defaultfiredocs/modules/defaultstyle/xslt/extractContent.xsl pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.xsl

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Thu Apr 16 12:47:48 2009
New Revision: 765614

URL: http://svn.apache.org/viewvc?rev=765614&view=rev
Log:
Cleaning up contract for xhtml resource type format.

Modified:
    lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl
    lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/extractContent.xsl
    lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.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=765614&r1=765613&r2=765614&view=diff
==============================================================================
--- lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl (original)
+++ lenya/contributions/2_0_X/modules/xhtmlfiredocs/xslt/xhtmlfiredocs2xhtml.xsl Thu Apr 16 12:47:48 2009
@@ -31,13 +31,15 @@
   <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 match="xhtml:body">
+    <xsl:copy>
+      <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="node()"/>
+      </div>
+    </xsl:copy>
   </xsl:template>
 
 

Modified: lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/extractContent.xsl
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/extractContent.xsl?rev=765614&r1=765613&r2=765614&view=diff
==============================================================================
--- lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/extractContent.xsl (original)
+++ lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/extractContent.xsl Thu Apr 16 12:47:48 2009
@@ -1,11 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
   xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns="http://www.w3.org/1999/xhtml"
   >
   
   
   <xsl:template match="xhtml:html">
-    <xsl:apply-templates select="xhtml:body/*"/>
+    <xsl:apply-templates select="xhtml:body"/>
+  </xsl:template>
+  
+  
+  <xsl:template match="xhtml:body">
+    <xsl:choose>
+      <xsl:when test="xhtml:div[@id = 'body']">
+        <xsl:apply-templates select="node()"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <div id="body">
+          <xsl:apply-templates select="node()"/>
+        </div>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
   
   

Modified: 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=765614&r1=765613&r2=765614&view=diff
==============================================================================
--- lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.xsl (original)
+++ lenya/contributions/2_0_X/pubs/defaultfiredocs/modules/defaultstyle/xslt/includeDocument.xsl Thu Apr 16 12:47:48 2009
@@ -10,11 +10,13 @@
   <xsl:param name="language"/>
   
   <xsl:template match="xi:include">
-    <i:include src="lenya-document:{$uuid},pub={$pub},area={$area},lang={$language}?format=xhtml">
+    <i:include src="cocoon:/{$pub}/{$area}/{$uuid}/{$language}.content">
       <i:fallback>
-        <p>
-          This document doesn't exist.
-        </p>
+        <div id="body">
+          <p>
+            This document doesn't exist.
+          </p>
+        </div>
       </i:fallback>
     </i:include>
   </xsl:template>
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.