forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r157419 - in forrest/trunk: main/webapp/ main/webapp/skins/leather-dev/templates/ plugins/org.apache.forrest.plugin.fbits/ plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/ plugins/org.apache.forrest.plugin.fbits/resources/templates/ plugins/org.apache.forrest.plugin.fbits/src/documentation/FORREST-INF/ tools/eclipse/
Date Mon, 14 Mar 2005 12:12:53 GMT
Author: thorsten
Date: Mon Mar 14 04:12:46 2005
New Revision: 157419

URL: http://svn.apache.org/viewcvs?view=rev&rev=157419
Log:
added more templates and changed the default behaviour of the default forrest:view

Added:
    forrest/trunk/main/webapp/skins/leather-dev/templates/
    forrest/trunk/main/webapp/skins/leather-dev/templates/default.fv
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.include.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.meta.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.xhtml.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/transform.ft.xsl
Removed:
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.include.main.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.meta.main.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.xhtml.main.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/transform.main.ft.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/FORREST-INF/
Modified:
    forrest/trunk/main/webapp/sitemap.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/forrest.properties
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/templates/fontsize.ft
    forrest/trunk/tools/eclipse/readme.txt

Modified: forrest/trunk/main/webapp/sitemap.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/sitemap.xmap?view=diff&r1=157418&r2=157419
==============================================================================
--- forrest/trunk/main/webapp/sitemap.xmap (original)
+++ forrest/trunk/main/webapp/sitemap.xmap Mon Mar 14 04:12:46 2005
@@ -477,7 +477,7 @@
     </map:pipeline>
 
     <map:pipeline internal-only="false">
-
+<!--pipeline that "marries" the docs in the root dir with the skin to produce html-->
       <map:match pattern="*.html">
         <map:aggregate element="site">
           <map:part src="cocoon:/skinconf.xml"/>
@@ -491,7 +491,7 @@
           <map:parameter name="path" value="{0}"/>
         </map:call>
       </map:match>         
-
+<!--pipeline that "marries" the docs in all other dirs then root with the skin to produce
html-->
       <map:match pattern="**/*.html">
         <map:aggregate element="site">
           <map:part src="cocoon:/skinconf.xml"/>

Added: forrest/trunk/main/webapp/skins/leather-dev/templates/default.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/leather-dev/templates/default.fv?view=auto&rev=157419
==============================================================================
--- forrest/trunk/main/webapp/skins/leather-dev/templates/default.fv (added)
+++ forrest/trunk/main/webapp/skins/leather-dev/templates/default.fv Mon Mar 14 04:12:46 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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.
+-->
+
+<forrest:view
+  xmlns:forrest="http://apache.org/forrest/templates/1.0" type="xhtml">
+  
+  <forrest:contract name="meta"/>
+  
+  <forrest:hook name="content">
+    <forrest:contract name="fontsize"/>
+		<forrest:hook name="export-link">
+      <forrest:contract name="txt-link"/>
+	    <forrest:contract name="xml-link"/>
+		</forrest:hook>
+  </forrest:hook>
+  
+  <forrest:contract name="feedback"/>
+  
+</forrest:view>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/forrest.properties
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/forrest.properties?view=diff&r1=157418&r2=157419
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/forrest.properties (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/forrest.properties Mon Mar 14 04:12:46
2005
@@ -45,9 +45,9 @@
 # project.content-dir if any other property using it is uncommented
 
 #project.status=status.xml
-#project.content-dir=src/documentation
+project.content-dir=src/documentation
 #project.raw-content-dir=${project.content-dir}/content
-#project.conf-dir=${project.content-dir}/conf
+project.conf-dir=${project.content-dir}/FORREST-INF
 #project.sitemap-dir=${project.content-dir}
 #project.xdocs-dir=${project.content-dir}/content/xdocs
 #project.resources-dir=${project.content-dir}/resources

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&r1=157418&r2=157419
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap Mon Mar 14 04:12:46
2005
@@ -17,6 +17,9 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
   <map:components>
+		<map:selectors>
+      <map:selector logger="sitemap.selector.exists" name="exists" src="org.apache.forrest.sourceexists.SourceExistsSelector"
/>
+    </map:selectors>
     <map:generators default="file">
       <map:generator name="directory" src="org.apache.cocoon.generation.DirectoryGenerator"
/>
       <map:generator label="content" logger="sitemap.generator.jx" name="jx" pool-grow="2"
pool-max="16" pool-min="2" src="org.apache.cocoon.generation.JXTemplateGenerator"/>
@@ -51,14 +54,39 @@
      <map:serialize type="xml"/>
    </map:match>
   </map:pipeline>
+
+  <map:pipeline>
+    <map:match pattern="prepare.view.*">
+      <map:select type="exists">
+        <!--here we will have to test, whether the requested page needs a specific view.
+          This will be assumed as soon there is a .ft 
+          e.g. index.xml + index.fv-->
+        <map:when test="{project:content.xdocs}{1}.fv">
+          <map:generate src="{project:content.xdocs}{1}.fv"/>
+        </map:when>
+<!--This should be match to the conf dir but I do not know ¿how?
+          {project:conf-dir} does not work -> ask on ml!
+          For now that matches the default.fv in the xdocs dir.
+          The problem with this solution is that the a default.xml will be always render
with the default view.
+          Not too bad of a problem after all ;-)-->
+        <map:when test="{project:content.xdocs}/default.fv">
+          <map:generate src="{project:content.xdocs}/default.fv"/>
+        </map:when>
+        <!--If the above not matches then get the default view of the skin-->
+        <map:otherwise>
+          <map:generate src="{forrest:skins-dir}{forrest:skin}/templates/default.fv"/>
+        </map:otherwise>
+      </map:select>
+     	<map:serialize type="xml"/>
+    </map:match>
+  </map:pipeline>
+
   
-  <!--NOTE: The following pipelines are e.g. main.ft -> should be * for document specific
output-->
-  
-<!--Aggregate the contract-templates requested by the main.ft for the xsl:include-->
+<!--Aggregate the contract-templates requested by the e.g. default.fv for the xsl:include-->
   <map:pipeline>
-    <map:match pattern="prepare.include.main">
-      <map:generate src="src/documentation/FORREST-INF/main.ft"/>
-      <map:transform src="resources/stylesheets/templates/prepare.include.main.xsl">
+    <map:match pattern="prepare.include.*">
+      <map:generate src="cocoon:/prepare.view.{1}"/>
+      <map:transform src="resources/stylesheets/templates/prepare.include.xsl">
 	      <map:parameter name="config-file" value="{project:skinconf}"/>
       </map:transform>
       <map:transform type="xinclude"/> 
@@ -67,37 +95,40 @@
   </map:pipeline>
 <!--Aggregate the forrest:properties requested by the main.ft-->
   <map:pipeline>
-    <map:match pattern="prepare.meta.main">
-      <map:generate src="src/documentation/FORREST-INF/main.ft"/>
-      <map:transform src="resources/stylesheets/templates/prepare.meta.main.xsl"/>
+    <map:match pattern="prepare.meta.*">
+      <map:generate src="cocoon:/prepare.view.{1}"/>
+      <map:transform src="resources/stylesheets/templates/prepare.meta.xsl"/>
       <map:transform type="xinclude"/> 
      	<map:serialize type="xml"/>
     </map:match>
   </map:pipeline>
   
- <!--Aggregate all contracts-templates requested by the main.ft
+ <!--Aggregate all contracts-templates requested by the view
   getHead - will parse the xhtml head output
   getBody - will parse the xhtml body output 
   --> 
   <map:pipeline>
-    <map:match pattern="prepare.xhtml.main">
+    <map:match pattern="prepare.xhtml.*">
       <map:aggregate element="forrest:filter">
-        <map:part src="src/documentation/FORREST-INF/main.ft" />
-        <map:part src="cocoon:/prepare.meta.main" /> 
+        <map:part src="cocoon:/prepare.view.{1}" />
+        <map:part src="cocoon:/prepare.meta.{1}" /> 
       </map:aggregate>
-      <map:transform src="resources/stylesheets/templates/prepare.xhtml.main.xsl" >
-      </map:transform>
+      <map:transform src="resources/stylesheets/templates/prepare.xhtml.xsl" />
      	<map:serialize type="xml"/>
     </map:match>
   </map:pipeline>
   <!--Outputs xhtml of the main.ft-->
   <map:pipeline>
-    <map:match pattern="transform.ft">
+    <map:match pattern="transform.*">
       <map:aggregate element="forrest:filter">
-        <map:part src="src/documentation/FORREST-INF/main.ft" />
-        <map:part src="cocoon:/prepare.meta.main" /> 
+        <map:part src="cocoon:/prepare.view.{1}" />
+        <map:part src="cocoon:/prepare.meta.{1}" /> 
       </map:aggregate>
-      <map:transform src="resources/stylesheets/templates/transform.main.ft.xsl" >
+      <map:transform src="resources/stylesheets/templates/prepare.include.xhtml.xsl" >
+        <map:parameter name="request" value="{1}"/>
+      </map:transform>
+     	<map:serialize type="xml"/>
+      <map:transform src="resources/stylesheets/templates/transform.ft.xsl" >
         <map:parameter name="path" value="{path}"/>
         <map:parameter name="config-file" value="{project:skinconf}"/>
       </map:transform>

Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.include.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.include.xsl?view=auto&rev=157419
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.include.xsl
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.include.xsl
Mon Mar 14 04:12:46 2005
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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.
+-->
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0"  
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:alias="http://www.w3.org/1999/XSL/TransformAlias">
+    <xsl:namespace-alias 
+         stylesheet-prefix="alias" result-prefix="xsl"/>
+
+  <xsl:template match="/">
+    <alias:stylesheet version="1.0">
+	    <xsl:for-each select="forrest:view//forrest:contract">
+	      <xi:include href="cocoon:/get.contract.{@name}.xhtml"/>
+	    </xsl:for-each>
+    </alias:stylesheet>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.meta.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.meta.xsl?view=auto&rev=157419
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.meta.xsl
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.meta.xsl
Mon Mar 14 04:12:46 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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.
+-->
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0"  
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  >
+
+
+  <xsl:template match="/">
+    <forrest:properties >
+	    <xsl:for-each select="forrest:view//forrest:contract">
+	      <xi:include href="cocoon:/get.contract-meta.{@name}"/>
+	    </xsl:for-each>
+    </forrest:properties>
+  </xsl:template>
+  
+</xsl:stylesheet>

Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.xhtml.xsl?view=auto&rev=157419
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.xhtml.xsl
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/prepare.xhtml.xsl
Mon Mar 14 04:12:46 2005
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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.
+-->
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0"  
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:alias="http://www.w3.org/1999/XSL/TransformAlias"
+  >
+  <xsl:namespace-alias stylesheet-prefix="alias" result-prefix="xsl"/>
+  
+  <xsl:template match="/">
+    <alias:stylesheet version="1.0">
+      <xsl:comment>All xhtml head elements requested by the forrest:template</xsl:comment>
+			<alias:template name="getHead">
+			  <xsl:for-each select="/*/forrest:properties/*[@head='true']">
+		      <alias:call-template name="{@name}-head" />
+			  </xsl:for-each>
+		   </alias:template>
+		   
+      <xsl:comment>All xhtml body elements requested by the forrest:template</xsl:comment>
+			<alias:template name="getBody">
+          <xsl:apply-templates select="/*/forrest:view"/>
+		   </alias:template>
+		</alias:stylesheet>
+	</xsl:template>
+	
+  <xsl:template match="forrest:view">
+    <xsl:apply-templates/>
+  </xsl:template>
+	
+	<xsl:template match="forrest:hook">
+    <div id="{@name}">
+      <xsl:apply-templates/>
+    </div>
+  </xsl:template>
+  
+  <xsl:template match="forrest:contract">
+    <xsl:variable name="name" select="@name"/>
+    <!--Test whether there is a body template needed-->
+    <xsl:if test="/*/forrest:properties/*[@body='true' and @name=$name]">
+	    <alias:call-template name="{@name}-body" />
+    </xsl:if>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/transform.ft.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/transform.ft.xsl?view=auto&rev=157419
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/transform.ft.xsl
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/templates/transform.ft.xsl
Mon Mar 14 04:12:46 2005
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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.
+-->
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0"  
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:alias="http://www.w3.org/1999/XSL/TransformAlias"
+  xmlns:saxon="http://saxon.sf.net/"
+  extension-element-prefixes="saxon"
+  >
+  
+  <xsl:namespace-alias stylesheet-prefix="alias" result-prefix="xsl"/>
+  <!--FIXME: ¡¡¡Need to make sure all variables are matched!!!-->
+ 	<xsl:param name="config-file"/>
+  <xsl:param name="path"/>
+  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
+  
+	<!--<xsl:include href="cocoon:/prepare.include.{$request}"/>
+  <xsl:include href="cocoon:/prepare.xhtml.{$request}"/>-->
+
+  <xsl:template match="/">
+    <html>
+      <head>
+    		<xsl:call-template name="getHead"/>
+      </head>
+      <body onload="init()">
+        <h1><xsl:value-of select="$request"/> </h1>
+        <xsl:call-template name="getBody"/>
+      </body>
+    </html>
+  </xsl:template>
+
+</xsl:stylesheet>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/templates/fontsize.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/templates/fontsize.ft?view=diff&r1=157418&r2=157419
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/templates/fontsize.ft
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/templates/fontsize.ft
Mon Mar 14 04:12:46 2005
@@ -33,7 +33,7 @@
 			  
 			  <xsl:template name="fontsize-body">
 			      <script type="text/javascript">ndeSetTextSize();</script>
-			      <div class="trail">
+			      <div class="branding-trail">
 			            Font size: 
 			              &#160;<input type="button" onclick="ndeSetTextSize('reset'); return
false;" title="Reset text" class="resetfont" value="Reset"/>      
 			              &#160;<input type="button" onclick="ndeSetTextSize('decr'); return
false;" title="Shrink text" class="smallerfont" value="-a"/>

Modified: forrest/trunk/tools/eclipse/readme.txt
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/readme.txt?view=diff&r1=157418&r2=157419
==============================================================================
--- forrest/trunk/tools/eclipse/readme.txt (original)
+++ forrest/trunk/tools/eclipse/readme.txt Mon Mar 14 04:12:46 2005
@@ -79,7 +79,8 @@
     - Eclipse Modelling Framework
     - EMF SDK
     - EMF Service Data Objects
-    - Graphical Editing FrameworkXSD Sxhema Infoset Model
+    - Graphical Editing Framework
+    - XSD Sxhema Infoset Model
   - click "Next"
   - accept the license aggreement (after reading it of course)
   - click "Next"



Mime
View raw message