forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r357566 - in /forrest/trunk/main/template-sites/v3/src/documentation: ./ content/xdocs/ content/xdocs/samples/ resources/themes/common/html/ resources/themes/common/xhtml2/
Date Sun, 18 Dec 2005 23:51:03 GMT
Author: thorsten
Date: Sun Dec 18 15:50:48 2005
New Revision: 357566

URL: http://svn.apache.org/viewcvs?rev=357566&view=rev
Log:
Added first support for xhtml2 within v3 with the first xhtml2 contract title.ft. As well
added a blank.ft for xhtml2 and established the basic setup 
for internal contracts. Per definition all internal.* contracts are resist in the xhtml2 dir.

Added:
    forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/
      - copied from r357269, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/src/documentation/content/xdocs/samples/
    forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv
      - copied, changed from r357299, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
    forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft
      - copied, changed from r357271, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/blank.ft
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/title.ft
      - copied, changed from r357294, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-title.ft
Modified:
    forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/site.xml
    forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap

Copied: forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv
(from r357299, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv?p2=forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv&p1=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv&r1=357299&r2=357566&rev=357566&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv
Sun Dec 18 15:50:48 2005
@@ -45,7 +45,7 @@
       <forrest:hook name="header">
         <forrest:contract name="branding-tagline">
           <forrest:property name="branding-tagline-name">new 
-            seed</forrest:property>
+            seed - input xhtml2</forrest:property>
           <forrest:property name="branding-tagline-tagline">powered by the 
             dispatcher</forrest:property>
         </forrest:contract>
@@ -88,9 +88,9 @@
 -->
         <jx:import uri="cocoon://prepare.tiles.export-link"/>
         <forrest:hook name="content">
-          <forrest:contract name="content-title" 
-            dataURI="cocoon://#{$getRequest}.title.xml"/>
-          <forrest:contract name="content-abstract" 
+          <forrest:contract name="xhtml2-content-title" 
+            dataURI="cocoon://internal.#{$getRequest}.title"/>
+          <!--<forrest:contract name="content-abstract" 
             dataURI="cocoon://#{$getRequest}.abstract.xml"/>
           <forrest:contract name="content-minitoc" 
             dataURI="cocoon://#{$getRequest}.toc.xml">
@@ -98,7 +98,7 @@
               min-sections="1" location="page"/>
           </forrest:contract>
           <forrest:contract name="content-main" 
-              dataURI="cocoon://#{$getRequest}.body.xml"/>
+              dataURI="cocoon://#{$getRequest}.body.xml"/>-->
         </forrest:hook>
     </forrest:hook>
     <forrest:hook name="footer">

Modified: forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/site.xml?rev=357566&r1=357565&r2=357566&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/site.xml (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/site.xml Sun Dec
18 15:50:48 2005
@@ -42,7 +42,11 @@
 <site label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="">
   <about label="About" tab="home">
     <index label="Index" href="index.html" description="Welcome to MyProj"/>
-    <target label="target" href="http://www.target-x.de/" description="test link"/>
+    <target label="target" href="http://www.target-x.de/" 
+      description="test link"/>
+    <samples label="Samples" href="samples/">
+      <xhtml2 label="XHTML2 Subset" href="xhtml2_subset.html"/>
+    </samples>
   </about>
 
   

Added: forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv?rev=357566&view=auto
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv
(added)
+++ forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv
Sun Dec 18 15:50:48 2005
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2002-2005 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:views 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  <!-- The following variables are used to contact data models and/or contracts. -->
+  <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
+  <jx:set var="getRequestExstension" value="#{$cocoon/parameters/getRequestExstension}"
/>
+    <forrest:view type="xhtml2" hooksXpath="/">
+      <forrest:contract name="title" 
+        dataURI="cocoon://#{$getRequest}.xml"/>
+    </forrest:view>
+</forrest:views>

Added: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft?rev=357566&view=auto
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft
(added)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft
Sun Dec 18 15:50:48 2005
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2005 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:contract 
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+  xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  name="xhtml2-content-title">
+  <description>
+    xhtml2-content-title - Template will output the title of the document. 
+  </description>
+  <usage><![CDATA[<forrest:contract name="siteinfo-meta" dataURI="cocoon://#{$getRequest}.title.xml"/>
+]]></usage>
+  <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+    name="xhtml2-content-title" inputFormat="xsl">
+     <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:param name="xhtml2-content-title" select="/"/>
+      <xsl:template match="/">
+        <forrest:content>
+          <forrest:part>
+            <xsl:comment>+ |start xhtml2-content-title +</xsl:comment>
+            <h1>
+              <xsl:value-of select="$xhtml2-content-title/*"/>
+            </h1>
+            <xsl:comment>+ |end xhtml2-content-title +</xsl:comment>
+          </forrest:part>
+          <forrest:part xpath="/html/head">
+            <xsl:comment>+ |start xhtml2-content-title +</xsl:comment>
+        <xsl:copy-of select="$xhtml2-content-title/*"/>
+        <xsl:comment>+ |end xhtml2-content-title +</xsl:comment>
+          </forrest:part>
+        </forrest:content>
+      </xsl:template>
+    </xsl:stylesheet>
+  </forrest:template>
+</forrest:contract>
\ No newline at end of file

Copied: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft
(from r357271, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/blank.ft)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft&p1=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/blank.ft&r1=357271&r2=357566&rev=357566&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/blank.ft
(original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft
Sun Dec 18 15:50:48 2005
@@ -18,6 +18,7 @@
 <forrest:contract 
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
   name="blank">
   
   <!--NOTE: 
@@ -30,6 +31,7 @@
   <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
     name="blank" inputFormat="xsl">
     <xsl:stylesheet version="1.1" 
+      xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       <!--<xsl:param name="defaultVariables" select="'test.html'"/>-->
       <!--<xsl:variable name="skin-img-dir" select="$defaultVariables/*/*[@name='skin-img-dir']/@value"/>-->

Copied: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/title.ft
(from r357294, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-title.ft)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/title.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/title.ft&p1=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-title.ft&r1=357294&r2=357566&rev=357566&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-title.ft
(original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/title.ft
Sun Dec 18 15:50:48 2005
@@ -18,32 +18,37 @@
 <forrest:contract 
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
-  name="content-title">
+   xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
+  name="title">
   <description>
-    content-title - Template will output the title (first h1 of the content) and the sub-title
(first h3 of the content). 
+    title - Templates for "title" mode.  
+    This will generate the title of the document.
   </description>
   <usage><![CDATA[<forrest:contract name="siteinfo-meta" dataURI="cocoon://#{$getRequest}.title.xml"/>
 ]]></usage>
   <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
-    name="content-title" inputFormat="xsl">
-     <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-       <xsl:param name="content-title" select="/"/>
-      <xsl:template match="/">
-        <forrest:content>
-          <forrest:part>
-            <xsl:comment>+ |start content-title +</xsl:comment>
-            <h1>
-              <xsl:value-of select="$content-title/*"/>
-            </h1>
-            <xsl:comment>+ |end content-title +</xsl:comment>
-          </forrest:part>
-          <forrest:part xpath="/html/head">
-            <xsl:comment>+ |start content-title +</xsl:comment>
-        <xsl:copy-of select="$content-title/*"/>
-        <xsl:comment>+ |end content-title +</xsl:comment>
-          </forrest:part>
-        </forrest:content>
-      </xsl:template>
-    </xsl:stylesheet>
+    name="title" inputFormat="xsl">
+      <xsl:stylesheet version="1.1" 
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+        xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2">
+        <xsl:param name="title" select="/"/>
+        <xsl:template match="/">
+          <forrest:content>
+            <forrest:part>
+              <xsl:apply-templates select="xhtml2:html/xhtml2:head"/>
+            </forrest:part>
+          </forrest:content>
+        </xsl:template>
+        <xsl:template match="xhtml2:head">
+          <xsl:choose>
+            <xsl:when test="xhtml2:title">
+              <xsl:copy-of select="xhtml2:title"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <title>*No* title found</title>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+      </xsl:stylesheet>
   </forrest:template>
 </forrest:contract>

Modified: forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap?rev=357566&r1=357565&r2=357566&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap Sun Dec 18 15:50:48
2005
@@ -59,6 +59,14 @@
   </map:components>
 
   <map:resources>
+    <map:resource name="jx-transformer">
+      <map:transform type="jx">
+        <map:parameter name="lenient-xpath" value="true" />
+        <map:parameter name="getRequest" value="{request}" />
+        <map:parameter name="getRequestExstension" value="{exstension}" />
+      </map:transform>
+    </map:resource>
+
     <map:resource name="transform-to-document">
       <map:act type="sourcetype" src="{src}">
         <map:select type="parameter">
@@ -93,17 +101,27 @@
       </map:match>
       <map:match pattern="**.html">
         <map:generate src="lm://resolve.structurer.{1}" />
-        <map:transform type="jx">
-          <map:parameter name="lenient-xpath" value="true" />
-          <map:parameter name="getRequest" value="{1}" />
-          <map:parameter name="getRequestExstension" value="html" />
-        </map:transform>
+        <map:call resource="jx-transformer">
+          <map:parameter name="exstension" value="html" />
+          <map:parameter name="request" value="{1}" />
+        </map:call>
         <map:transform type="dispatcher">
           <map:parameter name="type" value="html" />
           <map:parameter name="hooksTransformer"
             value="lm://hooks-to-html.xsl" />
         </map:transform>
         <map:serialize type="xhtml" />
+      </map:match>
+      <map:match pattern="internal.**.*">
+        <map:generate src="lm://resolve.structurer.{2}-to-xhtml2" />
+        <map:call resource="jx-transformer">
+          <map:parameter name="exstension" value="xhtml2" />
+          <map:parameter name="request" value="{1}" />
+        </map:call>
+        <map:transform type="dispatcher">
+          <map:parameter name="type" value="xhtml2" />
+        </map:transform>
+        <map:serialize type="xml"/>
       </map:match>
       <map:match pattern="**.xml">
         <map:call resource="transform-to-document">



Mime
View raw message