cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r159288 - in cocoon/site/src/forrest-configuration: resources/stylesheets/doc-aggregate2v12.xsl sitemap.xmap
Date Mon, 28 Mar 2005 20:05:59 GMT
Author: bdelacretaz
Date: Mon Mar 28 12:05:58 2005
New Revision: 159288

URL: http://svn.apache.org/viewcvs?view=rev&rev=159288
Log:
added 'legacy' tab as a temporary location for 2.1 docs, while we review them and integrate
their content to the new docs

Modified:
    cocoon/site/src/forrest-configuration/resources/stylesheets/doc-aggregate2v12.xsl
    cocoon/site/src/forrest-configuration/sitemap.xmap

Modified: cocoon/site/src/forrest-configuration/resources/stylesheets/doc-aggregate2v12.xsl
URL: http://svn.apache.org/viewcvs/cocoon/site/src/forrest-configuration/resources/stylesheets/doc-aggregate2v12.xsl?view=diff&r1=159287&r2=159288
==============================================================================
--- cocoon/site/src/forrest-configuration/resources/stylesheets/doc-aggregate2v12.xsl (original)
+++ cocoon/site/src/forrest-configuration/resources/stylesheets/doc-aggregate2v12.xsl Mon
Mar 28 12:05:58 2005
@@ -19,17 +19,20 @@
   <xsl:variable name="content-header" select="/aggregate/content/document/header"/>
   <xsl:variable name="comments" select="/aggregate/comments"/>
   <xsl:variable name="generated-before" select="/aggregate/generated-before"/>
-  <xsl:variable name="generated-after" select="/aggregate/generated-after"/>  
+  <xsl:variable name="generated-after" select="/aggregate/generated-after"/>
+  <xsl:variable name="meta" select="/aggregate/meta"/>
+
+  <!-- status indicates a 2.1 legacy document -->
+  <xsl:variable name="legacy21" select="$meta//source = 'legacy.21'"/>
+
   <xsl:template match="/">
     <document>
       <header>
-        <title>
-          <xsl:value-of select="$content-header/title"/>
-        </title>
+        <xsl:apply-templates select="$content-header/title" mode="header"/>
       </header>
       <body>
         <xsl:copy-of select="$generated-before/html/body/*"/>
-        <xsl:copy-of select="$content/*"/>
+        <xsl:apply-templates select="$content" mode="content"/>
         <xsl:copy-of select="$generated-after/html/body/*"/>
         <xsl:apply-templates select="$comments"/>
       </body>
@@ -56,4 +59,49 @@
       </div>
     </div>
   </xsl:template>
+
+  <!-- add note to title for 2.1 legacy docs -->
+  <xsl:template match="title" mode="header">
+    <title>
+      <xsl:value-of select="."/>
+      <xsl:if test="$legacy21">
+        <xsl:value-of select="' (2.1 legacy document)'"/>
+      </xsl:if>
+    </title>
+  </xsl:template>
+
+  <!-- optional status note before the body -->
+  <xsl:template match="body" mode="content">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+
+      <xsl:if test="$legacy21">
+          <fixme author="dev@cocoon.apache.org">
+            This document was copied as is from the Cocoon 2.1 documentation, but has not
+            yet been fully reviewed or moved to its new home.
+          </fixme>
+      </xsl:if>
+      <xsl:apply-templates mode="content"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <!-- convert <moved> to a <note> -->
+  <xsl:template match="moved" mode="content">
+    <note>
+      <p>
+          Moved to <a href="{@href}"><xsl:value-of select="@href"/></a>
+          (<xsl:value-of select="@author"/>)
+      </p>
+      <xsl:apply-templates mode="content"/>
+    </note>
+  </xsl:template>
+
+  <!-- copy other content elements -->
+  <xsl:template match="*" mode="content">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates mode="content"/>
+    </xsl:copy>
+  </xsl:template>
+
 </xsl:stylesheet>

Modified: cocoon/site/src/forrest-configuration/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/site/src/forrest-configuration/sitemap.xmap?view=diff&r1=159287&r2=159288
==============================================================================
--- cocoon/site/src/forrest-configuration/sitemap.xmap (original)
+++ cocoon/site/src/forrest-configuration/sitemap.xmap Mon Mar 28 12:05:58 2005
@@ -30,6 +30,11 @@
             <map:generate src="{project:content.xdocs}{1}/content_en.xml"/>
             <map:transform src="{defaults:stylesheets}/html2document.xsl"/>       
    
           </map:when>
+          <map:when test="{project:content.xdocs}{1}/content_en.xdoc">
+            <!-- a 2.1 legacy document in xdoc V1.0 format -->
+            <map:generate src="{project:content.xdocs}{1}/content_en.xdoc"/>
+            <map:transform src="{forrest:stylesheets}/docv10todocv11.xsl"/>
+          </map:when>
           <map:otherwise>
             <map:generate src="{project:content.xdocs}{1}/content_en.html" type="local-html"/>
             <map:transform src="{forrest:stylesheets}/html2document.xsl" />       
    
@@ -69,7 +74,7 @@
               <map:part src="cocoon:/generated-before/{1}" element="generated-before"/>
             
               <map:part src="cocoon:/html2document/{1}" element="content"/>
               <map:part src="cocoon:/generated-after/{1}" element="generated-after"/>
                
-              <map:part src="{project:content.xdocs}{1}/meta.xml"/>
+              <map:part src="{project:content.xdocs}{1}/meta.xml" element="meta"/>
               <map:part src="cocoon:/comments/{1}"/>
             </map:aggregate>
             <map:transform src="{project:resources.stylesheets}doc-aggregate2v12.xsl"/>



Mime
View raw message