You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2006/03/14 10:37:11 UTC

svn commit: r385779 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/genericXhtml.ft

Author: thorsten
Date: Tue Mar 14 01:37:10 2006
New Revision: 385779

URL: http://svn.apache.org/viewcvs?rev=385779&view=rev
Log:
Adding new contract that can be used on any given VALID xhmtl document. Will add the head and body of the document to the output. See the doco content-dir for an example

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/genericXhtml.ft   (with props)

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/genericXhtml.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/genericXhtml.ft?rev=385779&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/genericXhtml.ft (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/genericXhtml.ft Tue Mar 14 01:37:10 2006
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2006 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:forrest="http://apache.org/forrest/templates/1.0" 
+  name="genericXhtml">
+  <description>
+    <p>genericXhtml - Template will output generic markup.</p>
+  </description>
+  <usage><![CDATA[<forrest:contract name="genericXhtml"
+  dataURI="cocoon://#{$getRequest}.xml"/>]]></usage>
+  <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0" 
+    name="genericXhtml" inputFormat="xsl">
+    <xsl:stylesheet version="1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml" 
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+      <xsl:template match="/">
+        <forrest:content>
+          <forrest:part>
+            <xsl:copy-of select="xhtml:html/xhtml:body/*"/>
+          </forrest:part>
+          <forrest:part xpath="/html/head">
+            <xsl:copy-of select="xhtml:html/xhtml:head/*"/>
+          </forrest:part>
+        </forrest:content>
+      </xsl:template>
+    </xsl:stylesheet>
+  </forrest:template>
+</forrest:contract>
\ No newline at end of file

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/genericXhtml.ft
------------------------------------------------------------------------------
    svn:eol-style = native