forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r395353 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/content-css.ft
Date Wed, 19 Apr 2006 19:06:02 GMT
Author: thorsten
Date: Wed Apr 19 12:06:00 2006
New Revision: 395353

Adding content-css link that allows abitrary styles to be passed through. This is a nice to
have contract (should not be used in official forrest structurer) and I added a use-at-your-own-risk
warning and the note from Ross explaining the warning. Not tested yet.

      - copied, changed from r394787, forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/blank.ft

Copied: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/content-css.ft
(from r394787, forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/blank.ft)
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/blank.ft
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/content-css.ft
Wed Apr 19 12:06:00 2006
@@ -18,26 +18,36 @@
-  name="blank">
-  <!--NOTE: 
-    When using the blank template as c'n p master just search and replace 'blank' by the
+  name="content-css">
-    blank will output {contract-funtion}. This is just a blank contract, it will output *nothing*.
+    <warning>Use at your own risk!!!</warning>
+    <note>
+      Allowing and activating abitrary styles has its danger. The problem is that Forrest

+attempts to provide a unified output formats regardless of the input 
+format. If you use this contract and allow arbitrary styles through then forrest loose the
+to do this because user can create "headings" by making text larger and 
+bold, for example. Forrest has no way of knowing this is supposed to be 
+a heading and therefore cannot render it as such.
+    </note>
+    <p>This contract picks up the style element of the input and pass it through to
the output.</p>
-  <usage><![CDATA[<forrest:contract name="blank"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="content-css"/>]]></usage>
   <forrest:template xmlns:forrest=""
-    name="blank" inputFormat="xsl">
+    name="content-css" inputFormat="xsl">
     <xsl:stylesheet version="1.1" 
-      <!--<xsl:param name="defaultVariables" select="'test.html'"/>-->
-      <!--<xsl:variable name="skin-img-dir" select="$defaultVariables/*/*[@name='skin-img-dir']/@value"/>-->
       <xsl:template match="/">
-          <!--<forrest:part/>-->
-          <!--<forrest:part xpath="/html/head"/>-->
+          <forrest:part xpath="/html/head">
+            <xsl:apply-templates select="//style"/>
+          </forrest:part>
+      </xsl:template>
+      <xsl:template match="style">
+        <style type="text/css">
+          <xsl:value-of select="."/>
+        </style>

View raw message