Author: thorsten
Date: Fri Dec 16 21:33:45 2005
New Revision: 357299
URL: http://svn.apache.org/viewcvs?rev=357299&view=rev
Log:
Finished first working version of the common.fv with the new
dispatcherTransformer and corresponding contracts.
Added:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-main.ft
- copied, changed from r357269,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/content-main.ft
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-feedback.ft
- copied, changed from r357269,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-feedback.ft
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-last-published.ft
- copied, changed from r357269,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-last-published.ft
Modified:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
Modified:
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/resources/themes/common.fv?rev=357299&r1=357298&r2=357299&view=diff
==============================================================================
---
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
Fri Dec 16 21:33:45 2005
@@ -97,40 +97,20 @@
<forrest:property name="content-minitoc-conf" max-depth="2"
min-sections="1" location="page"/>
</forrest:contract>
+ <forrest:contract name="content-main"
+ dataURI="cocoon://#{$getRequest}.body.xml"/>
</forrest:hook>
</forrest:hook>
- <!--
- <forrest:hook name="container">
- <forrest:hook name="header">
- <forrest:hook name="nav-main-hook">
- </forrest:hook>
- </forrest:hook>
- <forrest:hook name="page">
- <forrest:hook name="leftbar">
- </forrest:hook>
- <forrest:hook name="content">
- <forrest:contract name="content-main">
- <forrest:properties contract="content-main">
- <forrest:property name="content-main" nugget="get.body">
- <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.body.xml"/>
- </forrest:property>
- </forrest:properties>
- </forrest:contract>
- </forrest:hook>
- </forrest:hook>
- </forrest:hook>
<forrest:hook name="footer">
<forrest:contract name="siteinfo-feedback">
- <forrest:properties contract="siteinfo-feedback">
<forrest:property name="siteinfo-feedback">
<feedback to="[EMAIL PROTECTED]"
href="mailto:[EMAIL PROTECTED] " >
Send feedback about the website to:
</feedback>
</forrest:property>
- </forrest:properties>
</forrest:contract>
<forrest:contract name="siteinfo-last-published"/>
- </forrest:hook>-->
+ </forrest:hook>
</forrest:view>
</forrest:views>
Copied:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-main.ft
(from r357269,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/content-main.ft)
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-main.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-main.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/content-main.ft&r1=357269&r2=357299&rev=357299&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/content-main.ft
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/content-main.ft
Fri Dec 16 21:33:45 2005
@@ -18,26 +18,24 @@
<forrest:contract
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="content-main" type="nugget">
+ name="content-main">
<description>
content-main - Template will output the content-main.
</description>
- <usage><![CDATA[<forrest:contract name="content-main">
- <forrest:properties contract="content-main">
- <forrest:property name="content-main" nugget="get.body">
- <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.body.xml"/>
- </forrest:property>
- </forrest:properties>
-</forrest:contract>]]></usage>
+ <usage><![CDATA[<forrest:contract name="content-main"
+ dataURI="cocoon://#{$getRequest}.body.xml"/>]]></usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="content-main" inputFormat="xsl" body="true"
head="false">
+ name="content-main" inputFormat="xsl">
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="content-main-body" >
- <xsl:param name="content-main"/>
- <xsl:comment>+ |start content-main +</xsl:comment>
- <xsl:copy-of
- select="$content-main/[EMAIL PROTECTED]'content']/[EMAIL
PROTECTED]'content-main']/*"/>
- <xsl:comment>+ |end content-main +</xsl:comment>
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part>
+ <xsl:comment>+ |start content-main +</xsl:comment>
+ <xsl:copy-of
+ select="//[EMAIL PROTECTED]'content-main']/*"/>
+ <xsl:comment>+ |end content-main +</xsl:comment>
+ </forrest:part>
+ </forrest:content>
</xsl:template>
</xsl:stylesheet>
</forrest:template>
Copied:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-feedback.ft
(from r357269,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-feedback.ft)
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-feedback.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-feedback.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-feedback.ft&r1=357269&r2=357299&rev=357299&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-feedback.ft
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-feedback.ft
Fri Dec 16 21:33:45 2005
@@ -16,7 +16,7 @@
limitations under the License.
-->
-<forrest:contract name="siteinfo-feedback" type="nugget"
+<forrest:contract name="siteinfo-feedback"
xmlns:forrest="http://apache.org/forrest/templates/1.0">
<description>
<p>The feedback element will be used to construct a
@@ -33,40 +33,43 @@
</div>
</description>
<usage><![CDATA[<forrest:contract name="siteinfo-feedback">
- <forrest:properties contract="siteinfo-feedback">
- <forrest:property name="siteinfo-feedback">
- <feedback to="[EMAIL PROTECTED]"
- href="\mailto:[EMAIL PROTECTED] " >
- Send feedback about the website to:
- </feedback>
- </forrest:property>
- </forrest:properties>
+ <forrest:property name="siteinfo-feedback">
+ <feedback to="[EMAIL PROTECTED]"
+ href="\mailto:[EMAIL PROTECTED] " >
+ Send feedback about the website to:
+ </feedback>
+ </forrest:property>
</forrest:contract>]]></usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="siteinfo-feedback" inputFormat="xsl" body="true"
- head="false">
+ name="siteinfo-feedback" inputFormat="xsl">
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="siteinfo-feedback-body">
- <xsl:param name="siteinfo-feedback"/>
- <div id="siteinfo-feedback">
- <xsl:value-of select="$siteinfo-feedback/feedback"/>
- <xsl:choose>
- <xsl:when
- test="$siteinfo-feedback/feedback/@href and
not($siteinfo-feedback/feedback/@href='')">
- <a id="feedbackto">
- <xsl:attribute name="href">
- <xsl:value-of select="$siteinfo-feedback/feedback/@href"/>
- <xsl:value-of select="$path"/>
- </xsl:attribute>
- <xsl:value-of select="$siteinfo-feedback/feedback/@to"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$siteinfo-feedback/feedback/@to"/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
+ <xsl:param name="siteinfo-feedback"/>
+ <xsl:param name="defaultVariables" select="'test.html'"/>
+ <xsl:variable name="path" select="$defaultVariables/*/[EMAIL
PROTECTED]'path']/@value"/>
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part>
+ <div id="siteinfo-feedback">
+ <xsl:value-of select="$siteinfo-feedback/feedback"/>
+ <xsl:choose>
+ <xsl:when
+ test="$siteinfo-feedback/feedback/@href and
not($siteinfo-feedback/feedback/@href='')">
+ <a id="feedbackto">
+ <xsl:attribute name="href">
+ <xsl:value-of
select="$siteinfo-feedback/feedback/@href"/>
+ <xsl:value-of select="$path"/>
+ </xsl:attribute>
+ <xsl:value-of select="$siteinfo-feedback/feedback/@to"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$siteinfo-feedback/feedback/@to"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </forrest:part>
+ </forrest:content>
</xsl:template>
</xsl:stylesheet>
</forrest:template>
Copied:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-last-published.ft
(from r357269,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-last-published.ft)
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-last-published.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-last-published.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-last-published.ft&r1=357269&r2=357299&rev=357299&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-last-published.ft
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-last-published.ft
Fri Dec 16 21:33:45 2005
@@ -16,7 +16,7 @@
limitations under the License.
-->
<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="siteinfo-last-published" type="nugget">
+ name="siteinfo-last-published">
<description>
siteinfo-last-published will output the last published date of the site
with the help of jscript.
</description>
@@ -24,13 +24,18 @@
<forrest:template
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="siteinfo-last-published" inputFormat="xsl" body="true"
head="false">
+ name="siteinfo-last-published" inputFormat="xsl">
<xsl:stylesheet version="1.1"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="siteinfo-last-published-body">
- <script type="text/javascript">document.write("<i18n:text
>Last Published:</i18n:text> " + document.lastModified);</script>
- </xsl:template>
+ <xsl:template match="/">
+ <forrest:content>
+ <!-- fixme: the jscript does not get written-->
+ <forrest:part>
+ <script type="text/javascript">document.write("<i18n:text >Last
Published:</i18n:text> " + document.lastModified);</script>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
</xsl:stylesheet>
</forrest:template>
</forrest:contract>