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 2008/02/15 14:43:21 UTC
svn commit: r628064 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc: ./
src/documentation/resources/ src/documentation/resources/structurer/
src/documentation/resources/structurer/url/
src/documentation/resources/themes/ src...
Author: thorsten
Date: Fri Feb 15 05:43:19 2008
New Revision: 628064
URL: http://svn.apache.org/viewvc?rev=628064&view=rev
Log:
Using the plugin to develope xhtml2 compatible dispatcher contracts since skins does not support xhtml2
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/structurer/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/structurer/url/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/structurer/url/pelt.fv (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/common/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/common/html/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/common/html/helper-html2-to-html.ft (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-main.ft (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-title.ft (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.content.panel.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.panel.xml (with props)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/forrest.properties
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/forrest.properties
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/forrest.properties?rev=628064&r1=628063&r2=628064&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/forrest.properties (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/forrest.properties Fri Feb 15 05:43:19 2008
@@ -23,4 +23,4 @@
# FIXME: FOR-785
forrest.validate.skinconf=false
-project.required.plugins=org.apache.forrest.plugin.input.XDoc,org.apache.forrest.plugin.input.projectInfo
+project.required.plugins=org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.internal.dispatcher,org.apache.forrest.themes.core,org.apache.forrest.plugin.output.inputModule,org.apache.forrest.plugin.input.XDoc,org.apache.forrest.plugin.input.projectInfo
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/structurer/url/pelt.fv
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/structurer/url/pelt.fv?rev=628064&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/structurer/url/pelt.fv (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/structurer/url/pelt.fv Fri Feb 15 05:43:19 2008
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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:views xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+<!-- The following variables are used to contact data models and/or contracts. -->
+ <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
+ <jx:set var="getRequestExtension"
+ value="#{$cocoon/parameters/getRequestExtension}"/>
+ <jx:set var="contextPath" value="#{$cocoon/parameters/contextPath}"/>
+ <forrest:view type="fo" hooksXpath="/">
+ <jx:import uri="cocoon://prepare.panels.common-fo"/>
+ </forrest:view>
+<!-- CSS View of the request e.g. index.dispatcher.css -->
+ <forrest:view type="css" hooksXpath="/">
+ <jx:import uri="cocoon://prepare.panels.pelt-css"/>
+ </forrest:view>
+<!-- HTML View of the request (e.g. index.html)-->
+ <forrest:view type="html" hooksXpath="/html/body">
+ <jx:import uri="cocoon://prepare.panels.pelt-html.head"/>
+ <forrest:hook name="container">
+ <jx:import uri="cocoon://prepare.panels.pelt-html.header"/>
+ <forrest:hook name="page">
+ <jx:import uri="cocoon://prepare.panels.pelt-html.leftbar"/>
+ <jx:import uri="cocoon://prepare.panels.pelt-html.content"/>
+ </forrest:hook>
+ <jx:import uri="cocoon://prepare.panels.pelt-html.footer"/>
+ </forrest:hook>
+ </forrest:view>
+</forrest:views>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/structurer/url/pelt.fv
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/common/html/helper-html2-to-html.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/common/html/helper-html2-to-html.ft?rev=628064&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/common/html/helper-html2-to-html.ft (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/common/html/helper-html2-to-html.ft Fri Feb 15 05:43:19 2008
@@ -0,0 +1,997 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="helper-html2-to-html">
+ <!--NOTE:
+ THIS IS JUST AN EXPLANATION!!!-->
+ <description>
+ <p> This contract will output a link to the getBlank.js that can be used when working with
+ forms and default values for text fields. See the pelt implementation of the
+ search-input contract, which is using this. </p>
+ </description>
+ <usage> <![CDATA[<forrest:contract name="helper-html2-to-html"/>]]>
+ </usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="helper-html2-to-html" inputFormat="xsl">
+ <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/2002/06/xhtml2"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html="http://www.w3.org/2002/06/xhtml2">
+ <!-- If imported into another stylesheet, allow the first level heading
+ - depth to be configured -->
+ <xsl:param name="xhtml-heading" select="1"/>
+ <!-- Use XHTML 1.0 as the output schema -->
+ <xsl:output method="html" version="1.0" encoding="utf-8"
+ omit-xml-declaration="yes" media-type="text/html"
+ doctype-public="-//W3C//DTD HTML 4.01//EN"
+ doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
+ <!-- Copy elements by default -->
+ <xsl:template match="comment()">
+ <xsl:comment>
+ <xsl:value-of select="."/>
+ </xsl:comment>
+ </xsl:template>
+ <!-- Do not process elements and attributes by default -->
+ <xsl:template match="html:*"/>
+ <xsl:template match="html:*/@*" priority="0"/>
+ <xsl:template match="html:*/@*" mode="insdel" priority="0"/>
+ <xsl:template match="html:*/@*" mode="image" priority="0"/>
+ <xsl:template match="html:*/@*" mode="quote" priority="0"/>
+ <xsl:template match="html:*/@*" mode="link" priority="0"/>
+ <!--
+ - XHTML Attribute Collections
+ -->
+ <!-- Core Attribute Collection -->
+ <xsl:template match="@class">
+ <xsl:param name="class"/>
+ <xsl:attribute name="class">
+ <xsl:if test="$class">
+ <xsl:value-of select="$class"/>
+ <xsl:text>
+ </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="@id|@title">
+ <xsl:attribute name="{local-name()}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- I18N Attribute Collection -->
+ <xsl:template match="@xml:lang">
+ <xsl:attribute name="lang">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- Bi-directional Text Collection -->
+ <xsl:template match="@dir">
+ <!-- TODO: Need to handle lro and rlo. Not in HTML4 -->
+ <xsl:attribute name="dir">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- Edit Collection -->
+ <xsl:template match="@edit" mode="insdel"/>
+ <xsl:template match="@datetime" mode="insdel">
+ <xsl:attribute name="datetime">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- Hypertext Attribute Collection -->
+ <xsl:template match="@href|@rel|@rev|@accesskey|@target" mode="link">
+ <xsl:attribute name="{local-name()}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="@navindex" mode="link">
+ <xsl:attribute name="tabindex">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- Make sure only one tag gets the cite attribute -->
+ <xsl:template match="@cite" mode="insdel">
+ <xsl:attribute name="cite">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="@cite" mode="quote">
+ <xsl:if test="count(@edit)=0">
+ <xsl:attribute name="cite">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+ <!-- Embedding Attribute Collection -->
+ <xsl:template match="@src" mode="image">
+ <xsl:attribute name="src">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="html:link/@type" mode="link">
+ <xsl:attribute name="type">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- Image Map Attribute Collection -->
+ <xsl:template match="@usemap|@ismap" mode="image">
+ <xsl:attribute name="{local-name()}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- Style Attribute Collection -->
+ <xsl:template match="@style">
+ <xsl:attribute name="style">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!--
+ - Block rendering templates
+ -->
+
+ <!-- If the edit attribute has been used, add a ins or del as appropriate -->
+ <xsl:template name="block">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- No edit attribute, just call next level -->
+ <xsl:when test="count(@edit)=0">
+ <xsl:call-template name="block-element">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Edit attribute set to "deleted", create a del element -->
+ <xsl:when test="@edit='deleted'">
+ <del>
+ <xsl:apply-templates select="@*" mode="insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="block-element">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </del>
+ </xsl:when>
+ <!-- Edit attribute set to "inserted", "changed", "moved", create an ins
+ - element -->
+ <xsl:otherwise>
+ <ins>
+ <xsl:apply-templates select="@*" mode="insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="block-element">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </ins>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- Create the element before any automatic inline children -->
+ <xsl:template name="block-element">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- The hr element is empty -->
+ <xsl:when test="$element='hr'">
+ <hr>
+ <xsl:apply-templates select="@*">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ </hr>
+ </xsl:when>
+ <!-- Create element -->
+ <xsl:otherwise>
+ <xsl:element name="{$element}">
+ <xsl:if test="$class">
+ <xsl:attribute name="class">
+ <xsl:value-of select="$class"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates select="@*">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="block-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- If the cite attribute appears without edit, create a quote element -->
+ <xsl:template name="block-quote">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+
+ <!-- If no cite attribute or edit was defined, continue to next level -->
+ <xsl:when
+ test="(count(@cite)=0) or (count(@edit)!=0)
+ or ($element='blockquote')">
+ <xsl:call-template name="block-link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Create the quote element -->
+ <xsl:otherwise>
+ <q>
+ <xsl:apply-templates select="@*" mode="quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="block-link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </q>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- If the href attribute appears, make a hyperlink -->
+ <xsl:template name="block-link">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If no href attribute appears, continue to next level -->
+ <xsl:when test="count(@href)=0">
+ <xsl:call-template name="block-image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- href has been used, so create an anchor -->
+ <xsl:otherwise>
+ <a>
+ <xsl:apply-templates select="@*" mode="link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="block-image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- If the src attribute appears, make an image -->
+ <xsl:template name="block-image">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If no src attribute appears, continue to next level -->
+ <xsl:when test="count(@src)=0">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <!-- src has been used, so replace with an image -->
+ <xsl:otherwise>
+ <img alt="{.}">
+ <xsl:apply-templates select="@*" mode="image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ </img>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!--
+ - Inline rendering templates
+ -->
+
+ <!-- If the edit attribute has been used, add a ins or del as appropriate -->
+ <xsl:template name="inline">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- No edit attribute, just call next level -->
+ <xsl:when test="count(@edit)=0">
+ <xsl:call-template name="inline-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Edit attribute set to "deleted", create a del element -->
+ <xsl:when test="@edit='deleted'">
+ <del>
+ <xsl:apply-templates select="@*" mode="insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="inline-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </del>
+ </xsl:when>
+ <!-- Edit attribute set to "inserted", "changed", "moved", create an ins
+ - element -->
+ <xsl:otherwise>
+ <ins>
+ <xsl:apply-templates select="@*" mode="insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="inline-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </ins>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- If the cite attribute appears without edit, create a quote element -->
+ <xsl:template name="inline-quote">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+
+ <!-- If no cite attribute or edit was defined, continue to next level -->
+ <xsl:when test="(count(@cite)=0) or (count(@edit)!=0)">
+ <xsl:call-template name="inline-link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Create the quote element -->
+ <xsl:otherwise>
+ <q>
+ <xsl:apply-templates select="@*" mode="quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="inline-link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </q>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- If the href attribute appears, make a hyperlink -->
+ <xsl:template name="inline-link">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If no href attribute appears, continue to next level -->
+ <xsl:when test="count(@href)=0">
+ <xsl:call-template name="inline-image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- href has been used, so create an anchor -->
+ <xsl:otherwise>
+ <a>
+ <xsl:apply-templates select="@*" mode="link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="inline-image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- If the src attribute appears, make an image -->
+ <xsl:template name="inline-image">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If no src attribute appears, continue to next level -->
+ <xsl:when test="count(@src)=0">
+ <xsl:call-template name="inline-element">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- src has been used, so replace with an image -->
+ <xsl:otherwise>
+ <img alt="{.}">
+ <xsl:apply-templates select="@*" mode="image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ </img>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- Finally, create the element (assuming not quote) -->
+ <xsl:template name="inline-element">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If element is 'q' or 'a', it has already been made -->
+ <xsl:when test="($element='q') or ($element='a')">
+ <xsl:apply-templates select="@*">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates/>
+ </xsl:when>
+ <!-- If element is 'br', make a span and put br at end -->
+ <xsl:when test="$element='br'">
+ <span class="line">
+ <xsl:apply-templates select="@*">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates/>
+ <br/>
+ </span>
+ </xsl:when>
+ <!-- Create element -->
+ <xsl:otherwise>
+ <xsl:element name="{$element}">
+ <xsl:apply-templates select="@*">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!--
+ - List rendering templates
+ -->
+
+ <!-- If the edit attribute has been used, add a ins or del as appropriate -->
+ <xsl:template name="list">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- No edit attribute, just call next level -->
+ <xsl:when test="count(@edit)=0">
+ <xsl:call-template name="list-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Edit attribute set to "deleted", create a del element -->
+ <xsl:when test="@edit='deleted'">
+ <del>
+ <xsl:apply-templates select="@*" mode="insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="list-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </del>
+ </xsl:when>
+ <!-- Edit attribute set to "inserted", "changed", "moved", create an ins
+ - element -->
+ <xsl:otherwise>
+ <ins>
+ <xsl:apply-templates select="@*" mode="insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="list-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </ins>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- If the cite attribute appears without edit, create a quote element -->
+ <xsl:template name="list-quote">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+
+ <!-- If no cite attribute or edit was defined, continue to next level -->
+ <xsl:when test="(count(@cite)=0) or (count(@edit)!=0)">
+ <xsl:call-template name="list-element">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Create the quote element -->
+ <xsl:otherwise>
+ <blockquote>
+ <xsl:apply-templates select="@*" mode="quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="list-element">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </blockquote>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- Create the element before any automatic inline children -->
+ <xsl:template name="list-element">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If going to be replaced with an image, create a para instead -->
+ <xsl:when test="count(@src)">
+ <p>
+ <xsl:apply-templates select="@*">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="list-link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </p>
+ </xsl:when>
+ <!-- Create element and continue to children -->
+ <xsl:otherwise>
+ <xsl:element name="{$element}">
+ <xsl:if test="$class">
+ <xsl:attribute name="class">
+ <xsl:value-of select="$class"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="count(html:summary)">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="html:summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates select="@*">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- If the href and src are provided, make a linked image -->
+ <xsl:template name="list-link">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If no href attribute appears, continue to next level -->
+ <xsl:when test="count(@href)=0">
+ <xsl:call-template name="list-image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- href has been used, so create an anchor -->
+ <xsl:otherwise>
+ <a>
+ <xsl:apply-templates select="@*" mode="link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="list-image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- If the src attribute appears, make an image -->
+ <xsl:template name="list-image">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <img alt="{.}">
+ <xsl:apply-templates select="@*" mode="image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ </img>
+ </xsl:template>
+ <!--
+ - List Item rendering templates
+ -->
+ <!-- Create the element before any automatic inline children -->
+ <xsl:template name="listitem">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:element name="{$element}">
+ <xsl:if test="$class">
+ <xsl:attribute name="class">
+ <xsl:value-of select="$class"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates select="@*">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="listitem-insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:element>
+ </xsl:template>
+
+ <!-- If the edit attribute has been used, add a ins or del as appropriate -->
+ <xsl:template name="listitem-insdel">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- No edit attribute, just call next level -->
+ <xsl:when test="count(@edit)=0">
+ <xsl:call-template name="listitem-link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Edit attribute set to "deleted", create a del element -->
+ <xsl:when test="@edit='deleted'">
+ <del>
+ <xsl:apply-templates select="@*" mode="insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="listitem-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </del>
+ </xsl:when>
+ <!-- Edit attribute set to "inserted", "changed", "moved", create an ins
+ - element -->
+ <xsl:otherwise>
+ <ins>
+ <xsl:apply-templates select="@*" mode="insdel">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="listitem-quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </ins>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- If the cite attribute appears without edit, create a quote element -->
+ <xsl:template name="listitem-quote">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+
+ <!-- If no cite attribute or edit was defined, continue to next level -->
+ <xsl:when test="(count(@cite)=0) or (count(@edit)!=0)">
+ <xsl:call-template name="listitem-link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- Create the quote element -->
+ <xsl:otherwise>
+ <q>
+ <xsl:apply-templates select="@*" mode="quote">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="listitem-link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </q>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- If the href attribute appears, make a hyperlink -->
+ <xsl:template name="listitem-link">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If no href attribute appears, continue to next level -->
+ <xsl:when test="count(@href)=0">
+ <xsl:call-template name="listitem-image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- href has been used, so create an anchor -->
+ <xsl:otherwise>
+ <a>
+ <xsl:apply-templates select="@*" mode="link">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ <xsl:call-template name="listitem-image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- If the src attribute appears, make an image -->
+ <xsl:template name="listitem-image">
+ <xsl:param name="element"/>
+ <xsl:param name="class"/>
+ <xsl:choose>
+ <!-- If no src attribute appears, continue to next level -->
+ <xsl:when test="count(@src)=0">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <!-- src has been used, so replace with an image -->
+ <xsl:otherwise>
+ <img alt="{.}">
+ <xsl:apply-templates select="@*" mode="image">
+ <xsl:with-param name="element" select="$element"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:apply-templates>
+ </img>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!--
+ - XHTML Structure Module
+ -->
+ <!-- Add our Subversion/CVS Id to the root element -->
+ <xsl:template match="html:html">
+ <xsl:comment> $Id: xhtml2html.xslt 127 2004-11-14 03:06:21Z etherealwake $
+ </xsl:comment>
+ <html>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates/>
+ </html>
+ </xsl:template>
+ <!-- Specify namespace for metadata (if not using schema.X links) -->
+ <xsl:template match="html:html/@profile">
+ <xsl:attribute name="profile">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- Add a generator tag to the head section -->
+ <xsl:template match="html:head">
+ <head>
+ <xsl:apply-templates select="@*"/>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <xsl:apply-templates/>
+ <xsl:if test="count(html:meta[@name='generator'])=0">
+ <meta name="generator" content="Ethereal Wake XHTML2 to XHTML1 XSLT"/>
+ </xsl:if>
+ </head>
+ </xsl:template>
+ <!-- <title> and <body> are pretty much copied as is -->
+ <xsl:template match="html:title|html:body">
+ <xsl:element name="{local-name()}">
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+ <!--
+ - XHTML Block Text Module
+ -->
+ <!-- Handle the elements practically unchanged since XHTML 1.0 -->
+ <xsl:template
+ match="html:address|html:blockquote|html:div|html:hr
+ |html:pre|html:hr">
+ <xsl:call-template name="block">
+ <xsl:with-param name="element" select="local-name(.)"/>
+ </xsl:call-template>
+ </xsl:template>
+ <!-- In XHTML 2.0, paragraphs are a bit more sophisticated than in 1.X -->
+ <xsl:template match="html:p">
+ <xsl:choose>
+ <!-- If we have XHTML 1.0 block children, make us a div -->
+ <xsl:when
+ test="count(html:ul|html:ol|html:nl|html:dl|html:blockcode
+ |html:blockquote|html:pre|html:table)>0">
+ <xsl:call-template name="block">
+ <xsl:with-param name="element" select="'div'"/>
+ <xsl:with-param name="class" select="'p'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <!-- If no block children, be a traditional paragraph -->
+ <xsl:otherwise>
+ <xsl:call-template name="block">
+ <xsl:with-param name="element" select="'p'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- We will treat sections as simple <div>s of class section -->
+ <xsl:template match="html:section">
+ <xsl:call-template name="block">
+ <xsl:with-param name="element" select="'div'"/>
+ <xsl:with-param name="class" select="'section'"/>
+ </xsl:call-template>
+ </xsl:template>
+ <!-- <h> gets mapped to a h# based on how many parent sections -->
+ <xsl:template match="html:h">
+ <!-- Count the number of sections -->
+ <xsl:variable name="levelbase">
+ <xsl:value-of select="count(ancestor::html:section)+$xhtml-heading"/>
+ </xsl:variable>
+ <!-- Limit the heading element to h6 -->
+ <xsl:variable name="level">
+ <xsl:choose>
+ <xsl:when test="$levelbase > 6">6</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$levelbase"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <!-- Create the appropriate element -->
+ <xsl:call-template name="block">
+ <xsl:with-param name="element" select="concat('h',$level)"/>
+ </xsl:call-template>
+ </xsl:template>
+ <!--
+ - XHTML Inline Text Module
+ -->
+ <!-- Handle the elements practically unchanged since XHTML 1.0 -->
+ <xsl:template
+ match="html:abbr|html:cite|html:code|html:dfn|html:em
+ |html:kbd|html:samp|html:span|html:strong|html:sub|html:sup
+ |html:var">
+ <xsl:call-template name="inline">
+ <xsl:with-param name="element" select="local-name()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <!-- quote maps to the 'q' element from XHTML 1.0 -->
+ <xsl:template match="html:quote">
+ <xsl:call-template name="inline">
+ <xsl:with-param name="element" select="'q'"/>
+ </xsl:call-template>
+ </xsl:template>
+ <!-- <l> is a more complex version of HTML's <br> -->
+ <xsl:template match="html:l">
+ <xsl:call-template name="inline">
+ <xsl:with-param name="element" select="'br'"/>
+ </xsl:call-template>
+ </xsl:template>
+ <!--
+ - XHTML Hypertext Module
+ -->
+ <xsl:template match="html:a">
+ <xsl:call-template name="inline">
+ <xsl:with-param name="element" select="'a'"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="html:a/@id" mode="link">
+ <xsl:attribute name="id">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!--
+ - XHTML List Module
+ -->
+ <xsl:template match="html:ul|html:ol|html:dl">
+ <xsl:call-template name="list">
+ <xsl:with-param name="element" select="local-name(.)"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="html:li|html:dt|html:dd">
+ <xsl:call-template name="listitem">
+ <xsl:with-param name="element" select="local-name(.)"/>
+ </xsl:call-template>
+ </xsl:template>
+ <!--
+ - XHTML Linking Module
+ -->
+ <xsl:template match="html:link">
+ <link>
+ <xsl:apply-templates select="@*" mode="link"/>
+ </link>
+ </xsl:template>
+ <xsl:template match="html:link/@media" mode="link">
+ <xsl:attribute name="media">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="html:link/@xml:lang" mode="link">
+ <xsl:attribute name="hreflang">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!--
+ - XHTML Metainformation Module
+ -->
+ <xsl:template match="html:meta">
+ <meta>
+ <xsl:apply-templates select="@*"/>
+ <xsl:attribute name="content">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </meta>
+ </xsl:template>
+ <xsl:template match="html:meta/@name">
+ <xsl:attribute name="name">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!--
+ - XHTML Object Module
+ -->
+ <!--
+ - Ruby Module
+ -->
+ <!--
+ - XHTML Scripting Module
+ -->
+ <!--
+ - XHTML Style Sheet Module
+ -->
+ <xsl:template match="html:style">
+ <style>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates/>
+ </style>
+ </xsl:template>
+ <xsl:template match="html:style/@media">
+ <xsl:attribute name="media">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!--
+ - XHTML Tables Module
+ -->
+ <!-- Some table elements are pretty much left unchanged -->
+ <xsl:template
+ match="html:caption|html:col|html:colgroup|html:thead
+ |html:tfoot|html:tbody|html:tr">
+ <xsl:element name="{local-name()}">
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="html:col/@span|html:colspan/@span">
+ <xsl:attribute name="span">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- td and th are pretty much as they were -->
+ <xsl:template match="html:td|html:th">
+ <xsl:call-template name="listitem">
+ <xsl:with-param name="element" select="local-name()"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template
+ match="html:td/@abbr|html:td/@axis|html:td/@colspan
+ |html:td/@headers|html:td/@rowspan|html:td/@scope|html:th/@abbr
+ |html:th/@axis|html:th/@colspan|html:th/@headers|html:th/@rowspan
+ |html:th/@scope">
+ <xsl:attribute name="{local-name()}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <!-- The table element acts a lot like a list -->
+ <xsl:template match="html:table">
+ <xsl:call-template name="list">
+ <xsl:with-param name="element" select="'table'"/>
+ </xsl:call-template>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/common/html/helper-html2-to-html.ft
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-main.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-main.ft?rev=628064&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-main.ft (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-main.ft Fri Feb 15 05:43:19 2008
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="content-main">
+ <description>
+ <p>
+ content-main
+ <br/>
+ Template will output the content-main.
+ </p>
+
+ <p>
+ properties:
+ <br/>
+ <headings type="boxed"/> - Heading types can be clean|underlined|boxed
+ </p>
+ </description>
+ <usage>
+<![CDATA[<forrest:contract name="content-main" dataURI="cocoon://#{$getRequest}.body.xml"/>
+ </forrest:property>
+ <!-- Heading types can be clean|underlined|boxed -->
+ <forrest:property name="content-main-conf">
+ <headings type="boxed"/>
+ </forrest:property>
+</forrest:contract>]]>
+ </usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="content-main" inputFormat="xsl">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2">
+ <xsl:include href="cocoon://prepare.contract.html.helper-html2-to-html"/>
+ <xsl:param name="content-main-conf" select='boxed'/>
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part>
+ <xsl:comment>+ |start content-main +</xsl:comment>
+ <xsl:apply-templates
+ select="//xhtml2:body/*"/>
+ <xsl:comment>+ |end content-main +</xsl:comment>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-main.ft
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-title.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-title.ft?rev=628064&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-title.ft (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-title.ft Fri Feb 15 05:43:19 2008
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="content-title">
+ <description>
+ content-title - Template will output the title (first h1 of the content) and
+ the sub-title (first h3 of the content).
+ </description>
+ <usage>
+<![CDATA[<forrest:contract name="content-title" dataURI="cocoon://#{$getRequest}.title.xml"/>
+]]>
+ </usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="content-title" inputFormat="xsl">
+ <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2">
+ <xsl:param name="content-title" select="/"/>
+ <xsl:variable name="title" select="$content-title/xhtml2:html/xhtml2:head/xhtml2:title"/>
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part>
+ <xsl:comment>+ |start content-title +</xsl:comment>
+ <h1 class="content-title">
+ <xsl:value-of select="$title"/>
+ </h1>
+ <xsl:comment>+ |end content-title +</xsl:comment>
+ </forrest:part>
+ <forrest:part xpath="/html/head">
+ <xsl:comment>+ |start content-title +</xsl:comment>
+ <title><xsl:value-of select="$title"/></title>
+ <xsl:comment>+ |end content-title +</xsl:comment>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/html/content-title.ft
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.content.panel.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.content.panel.xml?rev=628064&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.content.panel.xml (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.content.panel.xml Fri Feb 15 05:43:19 2008
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+ <forrest:hook name="content">
+ <forrest:hook name="export-link">
+ <forrest:contract name="content-pdf-link"/>
+ </forrest:hook>
+
+ <!-- FIXME - Problem with ndeSetTextSize() script from fontsize.js not compliant between Pelt and Leather-dev... -->
+ <forrest:hook class="trail">
+ <forrest:contract name="branding-fontsize"/>
+ </forrest:hook>
+ <forrest:contract name="content-title"
+ dataURI="cocoon://#{$getRequest}.xml"/>
+ <!--<forrest:contract name="content-abstract"
+ dataURI="cocoon://#{$getRequest}.abstract.xml"/>
+ <forrest:contract name="content-minitoc"
+ dataURI="cocoon://#{$getRequest}.toc.xml">
+ <forrest:property name="content-minitoc-conf" max-depth="2" min-sections="1"
+ location="page"/>
+ </forrest:contract>-->
+ <forrest:contract name="content-main"
+ dataURI="cocoon://#{$getRequest}.xml">
+ <forrest:property name="content-main-conf">
+ <headings type="underlined"/>
+ </forrest:property>
+ </forrest:contract>
+ <!--
+ <forrest:contract name="content-authors">
+ <forrest:property name="content-authors" nugget="get.authors">
+ <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.authors.xml"/>
+ </forrest:property>
+ </forrest:contract>
+ -->
+ </forrest:hook>
+</forrest:template>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.content.panel.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.panel.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.panel.xml?rev=628064&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.panel.xml (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.panel.xml Fri Feb 15 05:43:19 2008
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+<!--
+ @type defines this structurer to html.
+ @hooksXpath defines where all hooks will be injected (as prefix).
+ -->
+ <forrest:contract name="branding-css-links">
+<!-- More information around this contract
+ http://marc.theaimsgroup.com/?l=forrest-dev&m=113473237805195&w=2
+ -->
+<!--Note: The forrest:properties element does not exit anymore (in comparison to a previous versions) -->
+ <forrest:property name="branding-css-links-input">
+ <css url="common.css" media="screen" rel="alternate stylesheet"
+ theme="common"/>
+ <css url="leather-dev.css" media="screen" rel="alternate stylesheet"
+ theme="common"/>
+ <css url="pelt.screen.css" media="screen" theme="Pelt"/>
+<!-- You can request url specific css as defined above,
+ but beware that you need to use the *.dispatcher.css extension!!!-->
+ <css prefix="" url="#{$getRequest}.dispatcher.css" media="screen" theme="Pelt"/>
+ <css url="pelt.print.css" media="print"/>
+ <css>/* Extra css */
+p.quote {
+ margin-left: 2em;
+ padding: .5em;
+ background-color: #f0f0f0;
+ font-family: monospace;
+}</css>
+ </forrest:property>
+ </forrest:contract>
+ <forrest:contract name="siteinfo-meta" dataURI="lm://project.build-info">
+ <forrest:property name="custom">
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
+ </forrest:property>
+ <forrest:property name="theme" value="pelt"/>
+ </forrest:contract>
+ <forrest:contract name="siteinfo-meta-navigation"
+ dataURI="cocoon://#{$getRequest}.navigation.xml"/>
+ <forrest:contract name="siteinfo-meta-icon">
+ <forrest:property name="siteinfo-meta-icon">
+ <favicon-url>favicon.ico</favicon-url>
+ </forrest:property>
+ </forrest:contract>
+ <forrest:hook name="container">
+ <forrest:contract name="branding-breadcrumbs">
+ <forrest:property name="branding-breadcrumbs">
+ <trail>
+ <link1 name="MyGroup" href="http://www.apache.org/"/>
+ <link2 name="MyProject" href="http://forrest.apache.org/"/>
+ </trail>
+ </forrest:property>
+ </forrest:contract>
+ <forrest:hook name="header">
+ <forrest:contract name="branding-tagline">
+ <forrest:property name="branding-tagline-name">new
+ seed</forrest:property>
+ <forrest:property name="branding-tagline-tagline">powered by the
+ dispatcher</forrest:property>
+ </forrest:contract>
+ <forrest:hook class="logo">
+ <forrest:contract name="branding-logo">
+ <forrest:property name="branding-logo-name">
+ MyGroup</forrest:property>
+ <forrest:property name="branding-logo-description">MyGroup
+ Description</forrest:property>
+ <forrest:property name="branding-logo-url">
+ http://mygroup.org/</forrest:property>
+ <forrest:property name="branding-logo-logo">
+ images/group.png</forrest:property>
+ </forrest:contract>
+ </forrest:hook>
+ <forrest:hook class="logo">
+ <forrest:contract name="branding-logo">
+ <forrest:property name="branding-logo-name">
+ MyProject</forrest:property>
+ <forrest:property name="branding-logo-description">MyProject
+ Description</forrest:property>
+ <forrest:property name="branding-logo-url">
+ http://myproj.mygroup.org/</forrest:property>
+ <forrest:property name="branding-logo-logo">
+ images/project.png</forrest:property>
+ </forrest:contract>
+ </forrest:hook>
+ <forrest:contract name="helper-form-blank"/>
+ <forrest:contract name="search-input">
+ <forrest:property name="input-size">25</forrest:property>
+ <forrest:property name="search-input">
+ <search name="MyProject" domain="mydomain" provider="google"/>
+ </forrest:property>
+ </forrest:contract>
+ <forrest:hook name="nav-main-hook">
+ <forrest:contract name="nav-main"
+ dataURI="cocoon://#{$getRequest}.navigation.xml"/>
+ <forrest:hook name="publishedStrip" nbsp="true">
+ <forrest:contract name="nav-main-sub"
+ dataURI="cocoon://#{$getRequest}.navigation.xml"/>
+ <forrest:contract name="siteinfo-last-published"/>
+ </forrest:hook>
+ </forrest:hook>
+ </forrest:hook>
+ <forrest:hook name="page">
+ <forrest:hook class="breadtrail" nbsp="true" />
+<!--<forrest:contract name="branding-breadcrumbs">
+ <forrest:property name="branding-breadcrumbs">
+ <trail>
+ <link1 name="myGroup" href="http://www.apache.org/"/>
+ <link2 name="myProject" href="http://forrest.apache.org/"/>
+ <link3 name="" href=""/>
+ </trail>
+ </forrest:property>
+ </forrest:contract>-->
+ <forrest:hook name="leftbar">
+ <forrest:contract name="nav-section"
+ dataURI="cocoon://#{$getRequest}.navigation.xml">
+ <forrest:property name="nav-section-toc" nugget="get.tov">
+ <jx:import
+ uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
+ </forrest:property>
+ <forrest:property name="expanding">true</forrest:property>
+<!--<forrest:property name="toc" max-depth="2"/>-->
+ </forrest:contract>
+<!-- <forrest:contract name="genericMarkup">
+ <forrest:property name="genericMarkup">
+ <hr/>
+ </forrest:property>
+ </forrest:contract>-->
+<!-- <forrest:contract name="search-input">
+ <forrest:property name="input-size">18</forrest:property>
+ <forrest:property name="search-input">
+ <search name="MyProject" domain="mydomain" provider="google"/>
+ </forrest:property>
+ </forrest:contract>-->
+ <forrest:contract name="siteinfo-credits">
+ <forrest:property name="box-location">credit</forrest:property>
+ <forrest:property name="top-separator">true</forrest:property>
+<!--<forrest:property name="siteinfo-credits">
+ <credits>
+ <credit>
+ <name>Built with Apache Forrest</name>
+ <url>http://forrest.apache.org/</url>
+ <image>images/built-with-forrest-button.png</image>
+ <width>88</width>
+ <height>31</height>
+ </credit>
+ </credits>
+ </forrest:property>-->
+ </forrest:contract>
+<!-- <forrest:contract name="genericMarkup">
+ <forrest:property name="genericMarkup">
+ <hr/>
+ </forrest:property>
+ </forrest:contract>-->
+ <forrest:contract name="content-motd-page">
+ <forrest:property name="content-motd-page">
+ <motd>
+<!--FIXME: motd-page location needs removing
+These options are not effective anymore in dispatcher
+ Need to be removed in Structurer and contracts usage/decription-->
+<!--<motd-option pattern="index.html">
+ <motd-title>sample</motd-title>
+ <motd-page location="page">
+ This is an example of a Message of the day (MOTD).
+ </motd-page>
+ <motd-page-url>index.html</motd-page-url>
+ </motd-option>-->
+ <motd-option pattern="samples/faq.html">
+ <motd-title></motd-title>
+ <motd-page location="both"> How to enable this MOTD is on
+ this page. </motd-page>
+ <motd-page-url>#motd</motd-page-url>
+ </motd-option>
+ </motd>
+ </forrest:property>
+ </forrest:contract>
+ <forrest:contract name="nav-section-round-bottom"/>
+<!-- This content displays below the navigation. the below example displays
+ ApacheCon logos and links, but can be used for whatever, or commented out
+ <forrest:hook name="below-nav">
+ <forrest:contract name="siteinfo-credits">
+ <forrest:property name="box-location">credit2</forrest:property>
+ <forrest:property name="top-separator">false</forrest:property>
+ <forrest:property name="use-br">false</forrest:property>
+ <forrest:property name="siteinfo-credits">
+ <credits>
+ <credit>
+ <name>ApacheCon Europe 2007</name>
+ <url>http://apachecon.com/2007/EU/</url>
+ <image>http://apache.org/ads/ApacheCon/2007-europe-125x125.png</image>
+ <width>125</width>
+ <height>125</height>
+ </credit>
+ <credit>
+ <name>ApacheCon US 2007</name>
+ <url>http://people.apache.org/calendar.html#200711</url>
+ <image>http://apache.org/ads/ApacheCon/2007-usa-125x125.png</image>
+ <width>125</width>
+ <height>125</height>
+ </credit>
+ </credits>
+ </forrest:property>
+ </forrest:contract>
+</forrest:hook>-->
+<!-- end of below-nav content -->
+ </forrest:hook>
+ <forrest:hook name="content">
+ <forrest:hook name="export-link">
+ <forrest:contract name="content-pdf-link"/>
+ </forrest:hook>
+<!-- FIXME - Problem with ndeSetTextSize() script from fontsize.js not compliant between Pelt and Leather-dev... -->
+ <forrest:hook class="trail">
+ <forrest:contract name="branding-fontsize"/>
+ </forrest:hook>
+ <forrest:contract name="content-title"
+ dataURI="cocoon://#{$getRequest}.title.xml"/>
+ <forrest:contract name="content-abstract"
+ dataURI="cocoon://#{$getRequest}.abstract.xml"/>
+ <forrest:contract name="content-minitoc"
+ dataURI="cocoon://#{$getRequest}.toc.xml">
+ <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:property name="content-main-conf">
+ <headings type="underlined"/>
+ </forrest:property>
+ </forrest:contract>
+<!--
+ <forrest:contract name="content-authors">
+ <forrest:property name="content-authors" nugget="get.authors">
+ <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.authors.xml"/>
+ </forrest:property>
+ </forrest:contract>
+ -->
+ </forrest:hook>
+ </forrest:hook>
+ <forrest:hook name="footer">
+ <forrest:hook class="lastmodified">
+ <forrest:contract name="siteinfo-last-published"/>
+ </forrest:hook>
+ <forrest:hook class="copyright">
+ <forrest:contract name="siteinfo-copyright">
+ <forrest:property name="siteinfo-copyright">
+ <copyright>
+ <year inception="true">2002</year>
+ <vendor>The Example Organisation.</vendor>
+ <copyright-link>http://example.org</copyright-link>
+ </copyright>
+ </forrest:property>
+ </forrest:contract>
+ </forrest:hook>
+ <forrest:contract name="siteinfo-compliance-links"/>
+ <forrest:contract name="siteinfo-credits">
+ <forrest:property name="box-location">credit</forrest:property>
+ <forrest:property name="top-separator">false</forrest:property>
+ <forrest:property name="use-br">false</forrest:property>
+ <forrest:property name="siteinfo-credits">
+ <credits>
+ <credit>
+ <name>Built with Apache Forrest</name>
+ <url>http://forrest.apache.org/</url>
+ <image>images/built-with-forrest-button.png</image>
+ <width>88</width>
+ <height>31</height>
+ </credit>
+ <credit role="accueil">
+ <name>Built with Cocoon</name>
+ <url>http://cocoon.apache.org/</url>
+ <image>http://forrest.apache.org/images/built-with-cocoon.gif</image>
+ </credit>
+ </credits>
+ </forrest:property>
+ </forrest:contract>
+<!-- <forrest:contract name="siteinfo-feedback">
+ <forrest:properties contract="siteinfo-feedback">
+ <forrest:property name="siteinfo-feedback">
+ <feedback to="the Webmaster"
+ href="mailto:webmaster@foo.com?subject=Feedback " >
+ Send feedback about the website to:
+ </feedback>
+ </forrest:property>
+ </forrest:properties>
+ </forrest:contract>-->
+ </forrest:hook>
+ </forrest:hook>
+</forrest:template>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/src/documentation/resources/themes/pelt/panels/pelt-html.panel.xml
------------------------------------------------------------------------------
svn:eol-style = native