forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r106624 - in forrest/trunk/plugins/org.apache.forrest.plugin.fbits: . resources/stylesheets src/documentation src/documentation/content/xdocs
Date Fri, 26 Nov 2004 00:28:29 GMT
Author: thorsten
Date: Thu Nov 25 16:28:28 2004
New Revision: 106624

URL: http://svn.apache.org/viewcvs?view=rev&rev=106624
Log:
created pipeline needed to filter the demanded fbits (not finished yet). 
introduced forrest: xmlns to ft
modified the matching xsl
Removed:
   forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/fct-bits.xsl
Modified:
   forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap
   forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/contract.xsl
   forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/dir2contracts.xsl
   forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ft2xhtml.xsl
   forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/index.xml
   forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/ft-leather.xml

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap
Url: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap?view=diff&rev=106624&p1=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap&r1=106623&p2=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap&r2=106624
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap	(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap	Thu Nov 25 16:28:28
2004
@@ -37,19 +37,9 @@
 3. check where to place them
 4. output the xhtml
 -->
+
 <!-- 
 1. check all aviable fct 
-output e.g.
-<contracts>
-  <content>
-    <contract file-name="c-fontsize-fct.xml" css="fontsize" name="fontsize-fct">
-      <description>
-        This functions lets you change the size of the font you are using in the site with
a jscript.
-      </description>
-      <realpath>/home/thorsten/apache/cocoon-2.1.5.1/build/webapp/leather/fct-bits/c-fontsize-fct.xml</realpath>
-    </contract>
-  </content>
-</contracts>
 -->
   <map:pipeline>
     <map:match pattern="contracts-dir-fbits.get">
@@ -61,19 +51,19 @@
       <map:serialize type="xml"/>
     </map:match>
   </map:pipeline>
-  
-  <map:pipeline>
-    <map:match pattern="contracts-dir-nuggets.get">
-		  <map:generate type="directory" src="nuggets">
-        <map:parameter name="depth" value="1"/>
-        <!-- sorted alphabetically -->
-      	<map:parameter name="reverse" value="false"/>
-      </map:generate>
-      <map:serialize type="xml"/>
-    </map:match>
-  </map:pipeline>
-  
-  <!-- transform this dir-list -->
+
+<!--
+transform this dir-list 
+output e.g.
+<contracts>
+  <contract file-name="c-fontsize-fct.xml" css="fontsize" name="fontsize-fct">
+    <description>
+      This functions lets you change the size of the font you are using in the site with
a jscript.
+    </description>
+    <realpath>/home/thorsten/apache/cocoon-2.1.5.1/build/webapp/leather/fct-bits/c-fontsize-fct.xml</realpath>
+  </contract>
+</contracts>
+-->
   <map:pipeline>
     <map:match pattern="contracts.get">
 		  <map:generate src="cocoon:/contracts-dir-fbits.get"/>
@@ -84,7 +74,20 @@
     </map:match>
   </map:pipeline>
   
-  
+<!-- 
+2. check which fct are needed
+-->
+  <map:pipeline>
+    <map:match pattern="filter.get">
+      <map:aggregate element="filter">
+        <map:part src="src/documentation/ft-leather.xml" />
+        <map:part src="cocoon:/contracts.get" /> 
+      </map:aggregate>
+      <map:serialize type="xml"/>
+    </map:match>
+  </map:pipeline>
+
+<!--f:t directly transformed to div id="@name"-->
   <map:pipeline>
     <map:match pattern="ft.get">
 		   <map:generate src="src/documentation/ft-leather.xml"/>
@@ -94,5 +97,18 @@
        <map:serialize type="xml"/>
     </map:match>
   </map:pipeline>
+  
+  <!--just brainstroming pipe-->
+  <map:pipeline>
+    <map:match pattern="contracts-dir-nuggets.get">
+		  <map:generate type="directory" src="nuggets">
+        <map:parameter name="depth" value="1"/>
+        <!-- sorted alphabetically -->
+      	<map:parameter name="reverse" value="false"/>
+      </map:generate>
+      <map:serialize type="xml"/>
+    </map:match>
+  </map:pipeline>
+  
  </map:pipelines>
 </map:sitemap>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/contract.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/contract.xsl?view=diff&rev=106624&p1=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/contract.xsl&r1=106623&p2=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/contract.xsl&r2=106624
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/contract.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/contract.xsl
Thu Nov 25 16:28:28 2004
@@ -30,7 +30,6 @@
 -->
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <xsl:import href="fct-bits/fct-bits.xsl"/>
   <xsl:param name="contextPath"/>
   
   <!--+
@@ -53,5 +52,14 @@
       </body>
     </elements>
   </xsl:template>
-
+  
+  <xsl:template match="contract" mode="xhtml-head">
+    <xsl:comment>function name=<xsl:value-of select="@name"/> HEAD</xsl:comment>
+    <xsl:copy-of select="xhtml/head/*"/>
+  </xsl:template>
+  
+  <xsl:template match="contract" mode="xhtml-body">
+    <xsl:comment>function name=<xsl:value-of select="@name"/> BODY</xsl:comment>
+    <xsl:copy-of select="xhtml/body/*"/>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/dir2contracts.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/dir2contracts.xsl?view=diff&rev=106624&p1=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/dir2contracts.xsl&r1=106623&p2=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/dir2contracts.xsl&r2=106624
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/dir2contracts.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/dir2contracts.xsl
Thu Nov 25 16:28:28 2004
@@ -36,35 +36,33 @@
   </xsl:template>
 
 <xsl:template match="dir:file[starts-with(@name,'c-')]">
-    <xsl:variable name="fct-bit-file">
-      <xsl:value-of select="$contentDir"/>
-      <xsl:text>/fbits/</xsl:text>
-      <xsl:value-of select="@name"/>
-    </xsl:variable>
-    <xsl:variable name="fct-bit-title">
-      <xsl:value-of select="document($fct-bit-file)/contract/@name"/>
-    </xsl:variable>
-    <xsl:variable name="fct-bit-nc">
-      <xsl:value-of select="document($fct-bit-file)/contract/@nc"/>
-    </xsl:variable>
-    <xsl:variable name="fct-bit-tlc">
-      <xsl:value-of select="document($fct-bit-file)/contract/@tlc"/>
-    </xsl:variable>
-    <xsl:variable name="fct-bit-description">
-      <xsl:value-of select="document($fct-bit-file)/contract/description"/>
-    </xsl:variable>
-    <content>
-      <xsl:if test="$fct-bit-tlc='content'">
-        <contract name="{$fct-bit-title}" css="{$fct-bit-nc}" file-name="{@name}">
-          <description>
-            <xsl:value-of select="$fct-bit-description"/>
-          </description>
-          <realpath>  
-            <xsl:value-of select="$fct-bit-file"/>
-          </realpath>
-        </contract>
-      </xsl:if>
-    </content>
+  <xsl:variable name="fct-bit-file">
+    <xsl:value-of select="$contentDir"/>
+    <xsl:text>/fbits/</xsl:text>
+    <xsl:value-of select="@name"/>
+  </xsl:variable>
+  <xsl:variable name="fct-bit-title">
+    <xsl:value-of select="document($fct-bit-file)/contract/@name"/>
+  </xsl:variable>
+  <xsl:variable name="fct-bit-nc">
+    <xsl:value-of select="document($fct-bit-file)/contract/@nc"/>
+  </xsl:variable>
+  <xsl:variable name="fct-bit-tlc">
+    <xsl:value-of select="document($fct-bit-file)/contract/@tlc"/>
+  </xsl:variable>
+  <xsl:variable name="fct-bit-description">
+    <xsl:value-of select="document($fct-bit-file)/contract/description"/>
+  </xsl:variable>
+  <xsl:if test="$fct-bit-tlc='content'">
+    <contract name="{$fct-bit-title}" css="{$fct-bit-nc}" file-name="{@name}">
+      <description>
+        <xsl:value-of select="$fct-bit-description"/>
+      </description>
+      <realpath>  
+        <xsl:value-of select="$fct-bit-file"/>
+      </realpath>
+    </contract>
+  </xsl:if>
 </xsl:template>
 
 </xsl:stylesheet>

Deleted: /forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/fct-bits.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/fct-bits.xsl?view=auto&rev=106623
==============================================================================

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ft2xhtml.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ft2xhtml.xsl?view=diff&rev=106624&p1=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ft2xhtml.xsl&r1=106623&p2=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ft2xhtml.xsl&r2=106624
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ft2xhtml.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ft2xhtml.xsl
Thu Nov 25 16:28:28 2004
@@ -29,24 +29,24 @@
 
 -->
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <xsl:import href="fct-bits/fct-bits.xsl"/>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:forrest="http://apache.org/forrest/templates/1.0">
+  <!--<xsl:import href="fct-bits/fct-bits.xsl"/>-->
   <xsl:param name="contextPath"/>
   
   <!--+
   |Overall site template
   +-->
   <xsl:template match="/">
-    <ft>
+    <forrest:view>
       <xsl:apply-templates />
-    </ft>
+    </forrest:view>
   </xsl:template>
-  <xsl:template match="hook">
+  <xsl:template match="forrest:hook">
     <div id="{@name}">
       <xsl:apply-templates />
     </div>
   </xsl:template>
-    <xsl:template match="contract">
+    <xsl:template match="forrest:contract">
     <div id="{@name}">
       <xsl:apply-templates />
     </div>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/index.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/index.xml?view=diff&rev=106624&p1=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/index.xml&r1=106623&p2=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/index.xml&r2=106624
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/index.xml
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/index.xml
Thu Nov 25 16:28:28 2004
@@ -27,9 +27,8 @@
     </section>
     <section>
       <title>Examples</title>
-      <p><a href="site:contracts">Contracts</a> contains all fbits that
have been 
-      capsulated. It will display the basic information and a description about
-      the fbit.</p>
+      <p><a href="site:contracts">Contract</a> contains all fbits that
have been 
+      capsulated. It displays basic information and a description about the fbits contract.</p>
     </section>
     <section>
       <title>fbits</title>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/ft-leather.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/ft-leather.xml?view=diff&rev=106624&p1=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/ft-leather.xml&r1=106623&p2=forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/ft-leather.xml&r2=106624
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/ft-leather.xml
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/ft-leather.xml
Thu Nov 25 16:28:28 2004
@@ -15,8 +15,13 @@
   limitations under the License.
 -->
 
-<forrest-template>
-  <hook name="content">
-    <contract name="fontsize"/>
-  </hook>
-</forrest-template>
+<forrest:view
+  xmlns:forrest="http://apache.org/forrest/templates/1.0">
+  
+  <forrest:hook name="content">
+    <forrest:contract name="fontsize"/>
+    <forrest:contract name="txt"/>
+    <forrest:contract name="xml"/>
+  </forrest:hook>
+  
+</forrest:view>

Mime
View raw message