Author: thorsten
Date: Fri Dec 16 18:04:45 2005
New Revision: 357271
URL: http://svn.apache.org/viewcvs?rev=357271&view=rev
Log:
Some more refactored contracts and initial version of the common.fv with new
format.
Added:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
- copied, changed from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common.fv
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/blank.ft
- copied, changed from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/blank.ft
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main-sub.ft
- copied, changed from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/nav-main-sub.ft
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main.ft
- copied, changed from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/nav-main.ft
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-meta.ft
- copied unchanged from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-meta.ft
Copied:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
(from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common.fv)
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common.fv&r1=357265&r2=357271&rev=357271&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common.fv
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
Fri Dec 16 18:04:45 2005
@@ -19,38 +19,31 @@
<forrest:views
xmlns:forrest="http://apache.org/forrest/templates/1.0"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
- <forrest:view type="html">
- <forrest:css url="common.css"/>
- <forrest:contract name="siteinfo-meta">
- <forrest:properties contract="siteinfo-meta">
- <forrest:property name="siteinfo-meta" nugget="get.build.info">
- <jx:import uri="cocoon://build-info"/>
- </forrest:property>
- </forrest:properties>
+ <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
+ <jx:set var="getRequestExstension"
value="#{$cocoon/parameters/getRequestExstension}" />
+ <forrest:view type="html" xpath="/html/body">
+ <forrest:contract name="branding-css-links">
+ <forrest:property name="branding-css-links-input">
+ <css url="common.css"/>
+ </forrest:property>
</forrest:contract>
+ <forrest:contract name="siteinfo-meta" dataURI="lm://project.build-info"/>
<forrest:hook name="container">
<forrest:hook name="header">
- <forrest:contract name="branding-tagline">
- <forrest:properties contract="branding-tagline">
+ <forrest:contract name="branding-tagline">
<forrest:property name="branding-tagline-name">new
seed</forrest:property>
- <forrest:property name="branding-tagline-tagline">powered by
forrest:views</forrest:property>
- </forrest:properties>
+ <forrest:property name="branding-tagline-tagline">powered by the
dispatcher</forrest:property>
</forrest:contract>
<forrest:hook name="nav-main-hook">
- <forrest:contract name="nav-main">
- <forrest:properties contract="nav-main">
- <forrest:property name="nav-main" nugget="get.navigation">
- <jx:import
uri="cocoon://${cocoon.parameters.getRequest}.navigation.xml"/>
- </forrest:property>
- </forrest:properties>
- </forrest:contract>
- <forrest:contract name="nav-main-sub">
- <forrest:properties contract="nav-main-sub">
- <forrest:property name="nav-main-sub" nugget="get.navigation">
- <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
- </forrest:property>
- </forrest:properties>
- </forrest:contract>
+ <forrest:contract name="nav-main"
dataURI="cocoon://#{$getRequest}.navigation.xml"/>
+ <forrest:contract name="nav-main-sub"
dataURI="cocoon://#{$getRequest}.navigation.xml"/>
+ </forrest:hook>
+ </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">
@@ -70,7 +63,7 @@
</forrest:properties>
</forrest:contract>
</forrest:hook>
-<!--
+<!-#-
You can group elements to a template and call it from any view. e.g.
<forrest:hook name="export-link">
<forrest:contract name="content-xml-link"/>
@@ -84,11 +77,11 @@
HEADSUP:
<forrest:call-template name="export-link"/> is *not* working anymore!!!
--->
+-#->
<jx:import uri="cocoon://prepare.tiles.export-link"/>
- <!-- FIXME: jxpath -->
- <!-- Use this when jxpath bug is solved -->
- <!--<jx:import uri="lm:tiles.export-link"/>-->
+ <!-#- FIXME: jxpath -#->
+ <!-#- Use this when jxpath bug is solved -#->
+ <!-#-<jx:import uri="lm:tiles.export-link"/>-#->
<forrest:hook name="content">
<forrest:contract name="content-title">
@@ -138,6 +131,6 @@
</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/blank.ft
(from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/blank.ft)
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/blank.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/blank.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/blank.ft&r1=357265&r2=357271&rev=357271&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/blank.ft
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/blank.ft
Fri Dec 16 18:04:45 2005
@@ -18,29 +18,27 @@
<forrest:contract
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="blank" type="nugget">
+ name="blank">
<!--NOTE:
When using the blank template as c'n p master just search and replace
'blank' by the {contract-name}!-->
<description>
- {contract-name} will output {contract-funtion}. This is just a blank
contract, it will output *nothing*.
+ blank will output {contract-funtion}. This is just a blank contract, it
will output *nothing*.
</description>
<usage><![CDATA[<forrest:contract name="blank"/>]]></usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="blank" inputFormat="xsl" body="false" head="false">
+ name="blank" inputFormat="xsl">
<xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <!--
- Add here the needed templates.
- Remember to set the forrest:template @attributes!
- -->
- <!--
- <xsl:template name="blank-head">
- </xsl:template>
- <xsl:template name="blank-body">
- </xsl:template>
- -->
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <!--<xsl:param name="defaultVariables" select="'test.html'"/>-->
+ <!--<xsl:variable name="skin-img-dir" select="$defaultVariables/*/[EMAIL
PROTECTED]'skin-img-dir']/@value"/>-->
+ <xsl:template match="/">
+ <forrest:content>
+ <!--<forrest:part/>-->
+ <!--<forrest:part xpath="/html/head"/>-->
+ </forrest:content>
+ </xsl:template>
</xsl:stylesheet>
</forrest:template>
</forrest:contract>
Copied:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main-sub.ft
(from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/nav-main-sub.ft)
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main-sub.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main-sub.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/nav-main-sub.ft&r1=357265&r2=357271&rev=357271&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/nav-main-sub.ft
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main-sub.ft
Fri Dec 16 18:04:45 2005
@@ -15,27 +15,28 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<forrest:contract name="nav-main-sub" type="nugget"
+<forrest:contract name="nav-main-sub"
xmlns:forrest="http://apache.org/forrest/templates/1.0">
<description>
nav-main-sub will output the secondary navigation AKA level2.
</description>
- <usage><![CDATA[<forrest:contract name="nav-main-sub">
- <forrest:properties contract="nav-main-sub">
- <forrest:property name="nav-main-sub" nugget="get.navigation">
- <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
- </forrest:property>
- </forrest:properties>
-</forrest:contract>]]></usage>
+ <usage><![CDATA[<forrest:contract name="nav-main-sub"
dataURI="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>]]>
+ </usage>
<forrest:template
xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="nav-main-sub" inputFormat="xsl" body="true" head="false">
+ name="nav-main-sub" inputFormat="xsl">
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="nav-main-sub-body">
- <xsl:param name="nav-main-sub" select="'test'"/>
- <xsl:copy-of select="$nav-main-sub/navigation/tab/[EMAIL
PROTECTED]'nav-main-sub']/*"/>
- </xsl:template>
+ <xsl:template match="/" >
+ <forrest:content>
+ <forrest:part>
+ <div id="tabs"> <xsl:comment>+ |start Subtabs new
+</xsl:comment>
+ <xsl:copy-of
+ select="navigation/tab/[EMAIL PROTECTED]'nav-main-sub']"/>
+ <xsl:comment>+ |end Subtabs +</xsl:comment> </div>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
</xsl:stylesheet>
</forrest:template>
</forrest:contract>
Copied:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main.ft
(from r357265,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/nav-main.ft)
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/nav-main.ft&r1=357265&r2=357271&rev=357271&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/nav-main.ft
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/nav-main.ft
Fri Dec 16 18:04:45 2005
@@ -20,30 +20,24 @@
<description>
nav-main will output the main or primary navigation AKA tabs.
</description>
- <usage><![CDATA[<forrest:contract name="nav-main">
- <forrest:properties contract="nav-main">
- <forrest:property name="nav-main" nugget="get.navigation">
- <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
- </forrest:property>
- </forrest:properties>
-</forrest:contract>]]></usage>
+ <usage><![CDATA[<forrest:contract name="nav-main"
nugget="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>]]>
+ </usage>
<forrest:template
xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="nav-main" inputFormat="xsl" body="true" head="false">
+ format="html" name="nav-main" inputFormat="xsl" >
- <xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template name="nav-main-body">
- <xsl:param name="nav-main" select="'test'"/>
- <div id="tabs">
-<xsl:comment>+
- |start Tabs
- +</xsl:comment>
- <xsl:copy-of select="$nav-main/navigation/tab/[EMAIL
PROTECTED]'nav-main']"/>
-<xsl:comment>+
- |end Tabs
- +</xsl:comment>
- </div>
- </xsl:template>
- </xsl:stylesheet>
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/" >
+ <forrest:content>
+ <forrest:part>
+ <div id="tabs"> <xsl:comment>+ |start Tabs new +</xsl:comment>
+ <xsl:copy-of
+ select="navigation/tab/[EMAIL PROTECTED]'nav-main']"/>
+ <xsl:comment>+ |end Tabs +</xsl:comment> </div>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ </xsl:stylesheet>
</forrest:template>
</forrest:contract>