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 2005/01/30 23:03:43 UTC
svn commit: r149165 - in forrest/trunk: lib/core/
plugins/org.apache.forrest.plugin.fbits/
plugins/org.apache.forrest.plugin.fbits/fbits-xsl/
plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/
plugins/org.apache.forrest.plugin.fbits/src/documentation/
plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/
Author: thorsten
Date: Sun Jan 30 14:03:39 2005
New Revision: 149165
URL: http://svn.apache.org/viewcvs?view=rev&rev=149165
Log:
worked on the fbits plugin and added the jexl-lib because I need it in the fbit
Added:
forrest/trunk/lib/core/commons-jexl-1.0-beta-1-20040113.jar (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-feedback-fct.xsl (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-meta-fct.xsl (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ls.fbits.xsl (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/nuggets.xsl (with props)
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/view.filter.xsl (with props)
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-fontsize-fct.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pdf.link-fct.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pod.link-fct.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-txt.link-fct.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-xml.link-fct.xsl
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/filter.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/site.xml
forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/leather.ft
Added: forrest/trunk/lib/core/commons-jexl-1.0-beta-1-20040113.jar
URL: http://svn.apache.org/viewcvs/forrest/trunk/lib/core/commons-jexl-1.0-beta-1-20040113.jar?view=auto&rev=149165
==============================================================================
Binary file - no diff available.
Propchange: forrest/trunk/lib/core/commons-jexl-1.0-beta-1-20040113.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-feedback-fct.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-feedback-fct.xsl?view=auto&rev=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-feedback-fct.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-feedback-fct.xsl Sun Jan 30 14:03:39 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ 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 name="feedback-nug" nc="feedback" tlc=""
+ xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <description>
+ This function will output the html feedback information.
+ </description>
+
+
+ <xsl type="xhtml">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:template name="feedback-head">
+ <head/>
+ </xsl:template>
+
+ <xsl:template name="feedback-body">
+ <body>
+ <div id="feedback">
+ <xsl:value-of select="$config/feedback"/>
+ <xsl:choose>
+ <xsl:when test="$config/feedback/@href and not($config/feedback/@href='')">
+ <a id="feedbackto">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$config/feedback/@href"/>
+ <xsl:value-of select="$path"/>
+ </xsl:attribute>
+ <xsl:value-of select="$config/feedback/@to"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$config/feedback/@to"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </body>
+ </xsl:template>
+ </xsl:stylesheet>
+ </xsl>
+
+
+</forrest:contract>
\ No newline at end of file
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-feedback-fct.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-fontsize-fct.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-fontsize-fct.xsl?view=diff&r1=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-fontsize-fct.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-fontsize-fct.xsl Sun Jan 30 14:03:39 2005
@@ -17,28 +17,33 @@
<forrest:contract name="fontsize-fct" nc="fontsize" tlc="content"
xmlns:forrest="http://apache.org/forrest/templates/1.0">
<description>
- This functions lets you change the size of the font you are using in the site with a jscript.
+ This function lets you change the size of the font you are using in the site with a jscript.
</description>
+
+ <xsl type="xhtml">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+ <xsl:template name="fontsize-head">
+ <head>
+ <script type="text/javascript" language="javascript"
+ src="${root}skin/fontsize.js"></script>
+ </head>
+ </xsl:template>
+
+ <xsl:template name="fontsize-body">
+ <body onload="init()">
+ <script type="text/javascript">ndeSetTextSize();</script>
+ <div class="trail">
+ Font size:
+  <input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset"/>
+  <input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a"/>
+  <input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a"/>
+ </div>
+ </body>
+ </xsl:template>
+
+ </xsl:stylesheet>
+ </xsl>
- <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="fontsize" mode="xhtml-head">
- <head>
- <script type="text/javascript" language="javascript"
- src="{$root}skin/fontsize.js"></script>
- </head>
- </xsl:template>
-
- <xsl:template name="fontsize" mode="xhtml-body">
- <body onload="init()">
- <script type="text/javascript">ndeSetTextSize();</script>
- <div class="trail">
- Font size:
-  <input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset"/>
-  <input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a"/>
-  <input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a"/>
- </div>
- </body>
- </xsl:template>
-
- </xsl:stylesheet>
</forrest:contract>
Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-meta-fct.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-meta-fct.xsl?view=auto&rev=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-meta-fct.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-meta-fct.xsl Sun Jan 30 14:03:39 2005
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ 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 name="meta-nug" nc="meta" tlc=""
+ xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <description>
+ This functions will output the html meta information.
+ </description>
+
+
+ <xsl type="xhtml">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="meta-head">
+ <head>
+ <meta name="Generator" content="Apache Forrest"/>
+ <meta name="Forrest-version">
+ <xsl:attribute name="content">
+ <xsl:value-of select="//info/forrest-version"/>
+ </xsl:attribute>
+ </meta>
+ <meta name="Forrest-skin-name">
+ <xsl:attribute name="content">
+ <xsl:value-of select="//info/project-skin"/>
+ </xsl:attribute>
+ </meta>
+ </head>
+ </xsl:template>
+
+ <xsl:template name="meta-body">
+ <body/>
+ </xsl:template>
+
+ </xsl:stylesheet>
+ </xsl>
+
+
+</forrest:contract>
\ No newline at end of file
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-meta-fct.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pdf.link-fct.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pdf.link-fct.xsl?view=diff&r1=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pdf.link-fct.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pdf.link-fct.xsl Sun Jan 30 14:03:39 2005
@@ -20,19 +20,21 @@
This functions will output the PDF link with image.
</description>
- <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="pdf" mode="xhtml-head">
- <head/>
- </xsl:template>
-
- <xsl:template name="pdf" mode="xhtml-body">
- <body>
- <div id="pdf" title="Portable Document Format"><a href="{$filename-noext}.pdf" class="dida">
- <img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF - icon"/><br/>
- PDF</a>
- </div>
- </body>
- </xsl:template>
-
- </xsl:stylesheet>
+ <xsl type="xhtml">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="pdf-head">
+ <head/>
+ </xsl:template>
+
+ <xsl:template name="pdf-body">
+ <body>
+ <div id="pdf" title="Portable Document Format"><a href="{$filename-noext}.pdf" class="dida">
+ <img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF - icon"/><br/>
+ PDF</a>
+ </div>
+ </body>
+ </xsl:template>
+
+ </xsl:stylesheet>
+ </xsl>
</forrest:contract>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pod.link-fct.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pod.link-fct.xsl?view=diff&r1=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pod.link-fct.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-pod.link-fct.xsl Sun Jan 30 14:03:39 2005
@@ -20,19 +20,21 @@
This functions will output the POD link with image.
</description>
- <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="xml" mode="xhtml-head">
- <head/>
- </xsl:template>
-
- <xsl:template name="xml" mode="xhtml-body">
- <body>
- <div class="podlink" title="Plain Old Documentation"><a href="{$filename-noext}.pod" class="dida">
- <img class="skin" src="{$skin-img-dir}/poddoc.png" alt="POD - icon" /><br/>
- POD</a>
- </div>
- </body>
- </xsl:template>
-
- </xsl:stylesheet>
+ <xsl type="xhtml">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="xml-head">
+ <head/>
+ </xsl:template>
+
+ <xsl:template name="xml-body">
+ <body>
+ <div class="podlink" title="Plain Old Documentation"><a href="{$filename-noext}.pod" class="dida">
+ <img class="skin" src="{$skin-img-dir}/poddoc.png" alt="POD - icon" /><br/>
+ POD</a>
+ </div>
+ </body>
+ </xsl:template>
+
+ </xsl:stylesheet>
+ </xsl>
</forrest:contract>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-txt.link-fct.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-txt.link-fct.xsl?view=diff&r1=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-txt.link-fct.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-txt.link-fct.xsl Sun Jan 30 14:03:39 2005
@@ -19,37 +19,42 @@
<description>
This functions will output the TXT link with image and print link.
</description>
+
+
+ <xsl type="xhtml">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="txt-head">
+ <head/>
+ </xsl:template>
+
+ <xsl:template name="txt-body">
+ <body>
+ <script type="text/javascript" language="Javascript">
+ function printit() {
+ if (window.print) {
+ window.focus();
+ window.print();
+ }
+ }
+ </script>
+
+ <script type="text/javascript" language="Javascript">
+ var NS = (navigator.appName == "Netscape");
+ var VERSION = parseInt(navigator.appVersion);
+ if (VERSION > 3) {
+ document.write('<div class="txt" title="Print this Page">');
+ document.write(' <a href="javascript:printit()" class="dida">');
+ document.write(' <img class="skin" src="{$skin-img-dir}/printer.gif" alt="print - icon" />');
+ document.write(' <br />');
+ document.write(' PRINT</a>');
+ document.write('</div>');
+ }
+ </script>
+ </body>
+ </xsl:template>
+
+ </xsl:stylesheet>
+ </xsl>
- <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="txt" mode="xhtml-head">
- <head/>
- </xsl:template>
-
- <xsl:template name="txt" mode="xhtml-body">
-<body>
- <script type="text/javascript" language="Javascript">
-function printit() {
- if (window.print) {
- window.focus();
- window.print();
- }
-}
- </script>
-
- <script type="text/javascript" language="Javascript">
-var NS = (navigator.appName == "Netscape");
-var VERSION = parseInt(navigator.appVersion);
-if (VERSION > 3) {
- document.write('<div class="txt" title="Print this Page">');
- document.write(' <a href="javascript:printit()" class="dida">');
- document.write(' <img class="skin" src="{$skin-img-dir}/printer.gif" alt="print - icon" />');
- document.write(' <br />');
- document.write(' PRINT</a>');
- document.write('</div>');
-}
- </script>
- </body>
- </xsl:template>
- </xsl:stylesheet>
</forrest:contract>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-xml.link-fct.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-xml.link-fct.xsl?view=diff&r1=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-xml.link-fct.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/fbits-xsl/c-xml.link-fct.xsl Sun Jan 30 14:03:39 2005
@@ -19,20 +19,24 @@
<description>
This functions will output the XML link with image.
</description>
+
+ <xsl type="xhtml">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template name="xml-head">
+ <head/>
+ </xsl:template>
+
+ <xsl:template name="xml-body">
+ <body>
+ <div class="xml" title="raw XML"><a href="{$filename-noext}.xml" class="dida">
+ <img class="skin" src="{$skin-img-dir}/xmldoc.gif" alt="XML - icon" /><br/>
+ XML</a>
+ </div>
+ </body>
+ </xsl:template>
+
+ </xsl:stylesheet>
+ </xsl>
- <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="xml" mode="xhtml-head">
- <head/>
- </xsl:template>
-
- <xsl:template name="xml" mode="xhtml-body">
- <body>
- <div class="xml" title="raw XML"><a href="{$filename-noext}.xml" class="dida">
- <img class="skin" src="{$skin-img-dir}/xmldoc.gif" alt="XML - icon" /><br/>
- XML</a>
- </div>
- </body>
- </xsl:template>
- </xsl:stylesheet>
</forrest:contract>
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=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/output.xmap Sun Jan 30 14:03:39 2005
@@ -18,6 +18,7 @@
<map:components>
<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"/>
</map:generators>
<map:transformers default="xslt">
<map:transformer name="cinclude"
@@ -28,7 +29,10 @@
</map:components>
<map:pipelines>
-
+<!--
+ [poc] - Proof of concept pipeline
+ you can transform xsl
+ -->
<map:pipeline>
<map:match pattern="x">
<map:generate src="cocoon:/x-src"/>
@@ -36,42 +40,39 @@
<map:serialize type="xml" />
</map:match>
</map:pipeline>
-
+<!--
+ [poc] - Proof of concept pipeline src
+ you can transform xsl input xsl
+ -->
<map:pipeline>
<map:match pattern="x-src">
<map:generate src="resources/stylesheets/test.xsl"/>
<map:serialize type="xml" />
</map:match>
</map:pipeline>
-
+<!--
+ contract-transformer
+ -->
<map:pipeline>
- <map:match pattern="static.get">
- <map:generate src="fbits/c-fontsize-fct.xml"/>
- <map:transform src="resources/stylesheets/contract.xsl"/>
+ <map:match pattern="get.fbits.*">
+ <map:generate type="jx" src="fbits-xsl/c-{1}-fct.xsl"/>
+ <!--<map:transform src="resources/stylesheets/contract.xsl"/>-->
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
- <map:pipeline>
- <map:match pattern="f.*.get">
- <map:generate src="fbits/c-{1}-fct.xml"/>
- <map:transform src="resources/stylesheets/contract.xsl"/>
- <map:serialize type="xml"/>
- </map:match>
- </map:pipeline>
-
<!--
-1. check all aviable fct
-2. check which fct are needed
+
+1. check all aviable fct -> ls.fbits
+2. check which fct are needed -> is be controlled by the forrest:templates
3. check where to place them
4. output the xhtml
-->
-<!-- XSL
-1. check all aviable fct
--->
+<!-- ls.fbits
+ list the default fbits-->
<map:pipeline>
- <map:match pattern="contracts-dir-fbits-xsl.get">
+ <map:match pattern="ls.fbits">
<map:generate type="directory" src="fbits-xsl">
<map:parameter name="depth" value="1"/>
<!-- sorted alphabetically -->
@@ -81,8 +82,9 @@
</map:match>
</map:pipeline>
-<!--
-transform this dir-list
+<!--ls.fbits.l
+transform this dir-list and add more information
+
output e.g.
<contracts>
<contract file-name="c-fontsize-fct.xml" css="fontsize" name="fontsize-fct">
@@ -94,23 +96,47 @@
</contracts>
-->
<map:pipeline>
- <map:match pattern="contracts-xsl.get">
- <map:generate src="cocoon:/contracts-dir-fbits-xsl.get"/>
- <map:transform src="resources/stylesheets/dir2contracts-xsl.xsl">
+ <map:match pattern="ls.fbits.l">
+ <map:generate src="cocoon:/ls.fbits"/>
+ <map:transform src="resources/stylesheets/ls.fbits.xsl">
<map:parameter name="contentDir" value="{forrest:plugins}/org.apache.forrest.plugin.fbits"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
+<!--
+ load main forrest:view
+ -->
+ <map:pipeline>
+ <map:match pattern="view">
+ <map:generate src="src/documentation/leather.ft"/>
+ <map:serialize type="xml" />
+ </map:match>
+ </map:pipeline>
+
<!-- XSL
2. check which fct are needed and include them in the output
-->
+
+ <map:pipeline>
+ <map:match pattern="view.fbits">
+ <map:aggregate element="filter">
+ <map:part src="cocoon:/view" />
+ <map:part src="cocoon:/ls.fbits.l" />
+ </map:aggregate>
+ <map:transform src="resources/stylesheets/view.filter.xsl"/>
+ <map:transform type="xinclude"/>
+ <!--<map:transform src="resources/stylesheets/contract.xsl"/>-->
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+<!--POINTER-->
<map:pipeline>
<map:match pattern="ft.get">
<map:aggregate element="filter">
<map:part src="src/documentation/leather.ft" />
- <map:part src="cocoon:/contracts-xsl.get" />
+ <map:part src="cocoon:/ls.fbits.l" />
</map:aggregate>
<map:transform src="resources/stylesheets/ft-filter.xsl"/>
<map:transform type="xinclude"/>
@@ -173,7 +199,7 @@
<map:part src="cocoon:/contracts.get" />
</map:aggregate>
<map:transform src="resources/stylesheets/filter.xsl"/>
- <map:transform type="xinclude"/>
+ <map:transform type="xinclude"/>
<!--<map:transform src="resources/stylesheets/contract.xsl"/>-->
<map:serialize type="xml"/>
</map:match>
@@ -182,7 +208,7 @@
<!--f:t directly transformed to div id="@name"-->
<map:pipeline>
- <map:match pattern="ft.get">
+ <map:match pattern="ft.div.get">
<map:generate src="src/documentation/ft-leather.xml"/>
<map:transform src="resources/stylesheets/ft2xhtml.xsl">
<map:parameter name="contextPath" value="{request:contextPath}"/>
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&r1=149164&r2=149165
==============================================================================
--- 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 Sun Jan 30 14:03:39 2005
@@ -29,28 +29,30 @@
-->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:forrest="http://apache.org/forrest/templates/1.0">
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0">
<xsl:param name="contextPath"/>
<!--+
|Overall site template
+-->
<xsl:template match="/">
- <elements>
+ <forrest:xhtml>
<xsl:comment>context: <xsl:value-of select="$contextPath"/></xsl:comment>
<!--+
|XHTML-head
+-->
- <head>
+ <forrest:head>
<xsl:apply-templates select="forrest:contract" mode="xhtml-head"/>
- </head>
+ </forrest:head>
<!--+
|XHTML-body
+-->
- <body>
+ <forrest:body>
<xsl:apply-templates select="forrest:contract" mode="xhtml-body"/>
- </body>
- </elements>
+ </forrest:body>
+ </forrest:xhtml>
</xsl:template>
<xsl:template match="forrest:contract" mode="xhtml-head">
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/filter.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/filter.xsl?view=diff&r1=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/filter.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/filter.xsl Sun Jan 30 14:03:39 2005
@@ -14,20 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!--
-site2xml.xsl is the final stage in XML page production. It merges HTML from
-document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
-footer, searchbar, css etc. As input, it takes XML of the form:
-
-<elements>
- <branding/>
- <search/>
- <menu/>
- <content/>
- <siteinfo/>
-</elements>
-
--->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ls.fbits.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ls.fbits.xsl?view=auto&rev=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ls.fbits.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ls.fbits.xsl Sun Jan 30 14:03:39 2005
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ 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:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns:dir="http://apache.org/cocoon/directory/2.0"
+ xmlns:session="http://apache.org/cocoon/session/1.0"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ >
+
+<xsl:param name="contentDir" select="'default/path'"/>
+
+ <!--
+ Create row for each document. Information about the document is
+ extracted from the document itself using the document()
+ function.
+ -->
+ <xsl:template match="/">
+ <forrest:contracts xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <xsl:apply-templates select="//dir:file"/>
+ </forrest:contracts>
+ </xsl:template>
+
+<xsl:template match="dir:file">
+ <xsl:variable name="fct-bit-file">
+ <xsl:value-of select="$contentDir"/>
+ <xsl:text>/fbits-xsl/</xsl:text>
+ <xsl:value-of select="@name"/>
+ </xsl:variable>
+ <xsl:variable name="fct-bit-title">
+ <xsl:value-of select="document($fct-bit-file)//forrest:contract/@name"/>
+ </xsl:variable>
+ <xsl:variable name="fct-bit-nc">
+ <xsl:value-of select="document($fct-bit-file)/forrest:contract/@nc"/>
+ </xsl:variable>
+ <xsl:variable name="fct-bit-tlc">
+ <xsl:value-of select="document($fct-bit-file)/forrest:contract/@tlc"/>
+ </xsl:variable>
+ <xsl:variable name="fct-bit-description">
+ <xsl:value-of select="document($fct-bit-file)/forrest:contract/description"/>
+ </xsl:variable>
+
+ <forrest: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>
+ </forrest:contract>
+
+</xsl:template>
+
+</xsl:stylesheet>
+
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/ls.fbits.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/nuggets.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/nuggets.xsl?view=auto&rev=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/nuggets.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/nuggets.xsl Sun Jan 30 14:03:39 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ 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 name="html-meta">
+ <meta name="Generator" content="Apache Forrest"/>
+ <meta name="Forrest-version">
+ <xsl:attribute name="content">
+ <xsl:value-of select="//info/forrest-version"/>
+ </xsl:attribute>
+ </meta>
+ <meta name="Forrest-skin-name">
+ <xsl:attribute name="content">
+ <xsl:value-of select="//info/project-skin"/>
+ </xsl:attribute>
+ </meta>
+ </xsl:template>
+
+ <xsl:template name="feedback">
+ <div id="feedback">
+ <xsl:value-of select="$config/feedback"/>
+ <xsl:choose>
+ <xsl:when test="$config/feedback/@href and not($config/feedback/@href='')">
+ <a id="feedbackto">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$config/feedback/@href"/>
+ <xsl:value-of select="$path"/>
+ </xsl:attribute>
+ <xsl:value-of select="$config/feedback/@to"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$config/feedback/@to"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </xsl:template>
+ </xsl:stylesheet>
\ No newline at end of file
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/nuggets.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/view.filter.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/view.filter.xsl?view=auto&rev=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/view.filter.xsl (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/view.filter.xsl Sun Jan 30 14:03:39 2005
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ 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:xsl xmlns:forrest="http://apache.org/forrest/templates/1.0" format='xhtml'>
+ <head>
+ <xsl:apply-templates select="filter/forrest:view//forrest:contract" mode="head"/>
+ </head>
+ <forrest:bodies>
+ <xsl:apply-templates select="filter/forrest:view/*" mode="body"/>
+ </forrest:bodies>
+ </forrest:xsl>
+ </xsl:template>
+
+
+ <xsl:template match="forrest:hook" mode="body">
+ <forrest:hook id="{@name}">
+ <xsl:apply-templates mode="body"/>
+ </forrest:hook>
+ </xsl:template>
+
+ <xsl:template match="forrest:contract" mode="head">
+ <xsl:variable name="css-ft"><xsl:value-of select="@name"/></xsl:variable>
+ <xsl:variable name="includePath">fbits-xsl/<xsl:value-of select="//forrest:contracts/forrest:contract[@css=$css-ft]/@file-name"/></xsl:variable>
+ <xi:include href="{$includePath}#xpointer(/*/*[@type='xhtml']/*[name()='xsl:stylesheet']/*[substring-after(@name,'-')='head']/*/*)"/>
+ </xsl:template>
+
+ <xsl:template match="forrest:contract" mode="body">
+ <xsl:variable name="css-ft"><xsl:value-of select="@name"/></xsl:variable>
+ <xsl:variable name="includePath">fbits-xsl/<xsl:value-of select="//forrest:contracts/forrest:contract[@css=$css-ft]/@file-name"/></xsl:variable>
+ <forrest:body name="{@name}">
+ <xi:include href="{$includePath}#xpointer(/*/*[@type='xhtml']/*[name()='xsl:stylesheet']/*[substring-after(@name,'-')='body']/*)"/>
+ </forrest:body>
+
+ </xsl:template>
+
+
+
+</xsl:stylesheet>
Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/resources/stylesheets/view.filter.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/site.xml?view=diff&r1=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/site.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/content/xdocs/site.xml Sun Jan 30 14:03:39 2005
@@ -41,8 +41,8 @@
<index href="fbits.html" label="index"/>
<example label="examples">
<static-sample label="static-sample" href="static.get"/>
- <contracts-dir-fbits label="contracts-dir-fbits" href="contracts-dir-fbits.get"/>
- <contracts-dir-fbits-xsl label="contracts-dir-fbits-xsl" href="contracts-dir-fbits-xsl.get"/>
+ <contracts-dir-fbits label="aviable-fbits.get" href="aviable-fbits.get"/>
+ <contracts-dir-fbits-xsl label="aviable-fbits.show" href="aviable-fbits.show"/>
<contracts-dir-nuggets label="contracts-dir-nuggets" href="contracts-dir-nuggets.get"/>
<contracts label="contracts" href="contracts.get"/>
<ft label="ft" href="ft.get"/>
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/leather.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/leather.ft?view=diff&r1=149164&r2=149165
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/leather.ft (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.fbits/src/documentation/leather.ft Sun Jan 30 14:03:39 2005
@@ -16,12 +16,18 @@
-->
<forrest:view
- xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ xmlns:forrest="http://apache.org/forrest/templates/1.0" type="xhtml">
+
+ <forrest:contract name="meta"/>
<forrest:hook name="content">
<forrest:contract name="fontsize"/>
- <forrest:contract name="txt"/>
- <forrest:contract name="xml"/>
+ <forrest:hook name="export-link">
+ <forrest:contract name="txt"/>
+ <forrest:contract name="xml"/>
+ </forrest:hook>
+
</forrest:hook>
+ <forrest:contract name="feedback"/>
</forrest:view>