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 2009/08/27 14:07:47 UTC
svn commit: r808385 [9/14] - in
/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher:
./ resources/stylesheets/ resources/stylesheets/fo/
resources/stylesheets/helper/ resources/stylesheets/html/
resources/styleshe...
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/layout-master-set.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/layout-master-set.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/layout-master-set.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/layout-master-set.contract.xml Thu Aug 27 12:07:38 2009
@@ -15,17 +15,14 @@
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="layout-master-set">
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0"
+name="layout-master-set">
<description>
- <p>
- layout master set generate the ...
- </p>
+ <p>layout master set generate the ...</p>
</description>
<usage>
-<![CDATA[<forrest:contract name="layout-master-set">
+ <![CDATA[<forrest:contract name="layout-master-set">
<forrest:property name="config">
<!-- Settings specific to PDF output. -->
<!--
@@ -53,120 +50,96 @@
</margins>
</forrest:property>
</forrest:contract>]]>
- </usage>
- <forrest:template
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="layout-master-set" inputFormat="xsl">
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
- <xsl:param name="config"/>
+</usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="layout-master-set" inputFormat="xsl">
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+ <xsl:param name="config" />
<xsl:include href="lm://pdf.transform.helper.layout" />
-<!-- The page size to be used -->
- <xsl:variable name="pagesize"
- select="string($config/page/@size)"/>
-<!-- The page orientation ("portrait" or "landscape") -->
+ <!-- The page size to be used -->
+ <xsl:variable name="pagesize" select="string($config/page/@size)" />
+ <!-- The page orientation ("portrait" or "landscape") -->
<xsl:variable name="pageorientation"
- select="string($config/page/@orientation)"/>
-<!-- Double-sided printing toggle -->
+ select="string($config/page/@orientation)" />
+ <!-- Double-sided printing toggle -->
<xsl:variable name="doublesided"
- select="string($config/margins/@double-sided)"/>
-<!-- The top page margin -->
- <xsl:variable name="topmargin"
- select="string($config/margins/top)"/>
-<!-- The bottom page margin -->
+ select="string($config/margins/@double-sided)" />
+ <!-- The top page margin -->
+ <xsl:variable name="topmargin" select="string($config/margins/top)" />
+ <!-- The bottom page margin -->
<xsl:variable name="bottommargin"
- select="string($config/margins/bottom)"/>
-<!-- The inner page margin (always the left margin if
+ select="string($config/margins/bottom)" />
+ <!-- The inner page margin (always the left margin if
double-sided printing is off, alternating between left and right if
it's on) -->
<xsl:variable name="innermargin"
- select="string($config/margins/inner)"/>
-<!-- The outer page margin (always the right margin if
+ select="string($config/margins/inner)" />
+ <!-- The outer page margin (always the right margin if
double-sided printing is off, alternating between right and left if
it's on)-->
<xsl:variable name="outermargin"
- select="string($config/margins/outer)"/>
+ select="string($config/margins/outer)" />
<xsl:template match="/">
<forrest:content>
<forrest:part xpath="/fo/layout-master-set">
- <fo:simple-page-master
- master-name="first-page"
- page-height="{$pageheight}"
- page-width="{$pagewidth}"
- margin-top="{$topmargin}"
- margin-bottom="{$bottommargin}"
- margin-left="{$innermargin}"
- margin-right="{$outermargin}">
- <fo:region-body margin-top="0.5in"
- margin-bottom=".5in"/>
- <fo:region-after region-name="first-footer"
- extent=".5in" display-align="before"/>
+ <fo:simple-page-master master-name="first-page"
+ page-height="{$pageheight}" page-width="{$pagewidth}"
+ margin-top="{$topmargin}" margin-bottom="{$bottommargin}"
+ margin-left="{$innermargin}" margin-right="{$outermargin}">
+ <fo:region-body margin-top="0.5in" margin-bottom=".5in" />
+ <fo:region-after region-name="first-footer" extent=".5in"
+ display-align="before" />
</fo:simple-page-master>
- <fo:simple-page-master
- master-name="even-page"
- page-height="{$pageheight}"
- page-width="{$pagewidth}"
- margin-top="{$topmargin}"
- margin-bottom="{$bottommargin}">
+ <fo:simple-page-master master-name="even-page"
+ page-height="{$pageheight}" page-width="{$pagewidth}"
+ margin-top="{$topmargin}" margin-bottom="{$bottommargin}">
<xsl:choose>
<xsl:when test="$doublesided = 'true'">
<xsl:attribute name="margin-left">
- <xsl:value-of select="$outermargin"/>
+ <xsl:value-of select="$outermargin" />
</xsl:attribute>
<xsl:attribute name="margin-right">
- <xsl:value-of select="$innermargin"/>
+ <xsl:value-of select="$innermargin" />
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="margin-left">
- <xsl:value-of select="$innermargin"/>
+ <xsl:value-of select="$innermargin" />
</xsl:attribute>
<xsl:attribute name="margin-right">
- <xsl:value-of select="$outermargin"/>
+ <xsl:value-of select="$outermargin" />
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
- <fo:region-body margin-top="0.5in"
- margin-bottom=".5in"/>
- <fo:region-before region-name="even-header"
- extent="0.5in"/>
- <!-- commented out from region-body
+ <fo:region-body margin-top="0.5in" margin-bottom=".5in" />
+ <fo:region-before region-name="even-header" extent="0.5in" />
+ <!-- commented out from region-body
because it is not standard conforming
border-bottom="0.5pt solid" -->
- <fo:region-after region-name="even-footer"
- extent=".5in" display-align="before"/>
+ <fo:region-after region-name="even-footer" extent=".5in"
+ display-align="before" />
</fo:simple-page-master>
<fo:simple-page-master master-name="odd-page"
- page-height="{$pageheight}"
- page-width="{$pagewidth}"
- margin-top="{$topmargin}"
- margin-bottom="{$bottommargin}"
- margin-left="{$innermargin}"
- margin-right="{$outermargin}">
- <fo:region-body margin-top="0.5in"
- margin-bottom=".5in"/>
- <fo:region-before region-name="odd-header"
- extent="0.5in"
- />
- <!-- commented out from region-body
+ page-height="{$pageheight}" page-width="{$pagewidth}"
+ margin-top="{$topmargin}" margin-bottom="{$bottommargin}"
+ margin-left="{$innermargin}" margin-right="{$outermargin}">
+ <fo:region-body margin-top="0.5in" margin-bottom=".5in" />
+ <fo:region-before region-name="odd-header" extent="0.5in" />
+ <!-- commented out from region-body
because it is not standard conforming
border-bottom="0.5pt solid" -->
- <fo:region-after region-name="odd-footer"
- extent=".5in" display-align="before"/>
+ <fo:region-after region-name="odd-footer" extent=".5in"
+ display-align="before" />
</fo:simple-page-master>
<fo:page-sequence-master master-name="book">
<fo:repeatable-page-master-alternatives>
- <fo:conditional-page-master-reference
- page-position="first"
- master-reference="first-page"/>
- <fo:conditional-page-master-reference
- odd-or-even="odd"
- master-reference="odd-page"/>
- <fo:conditional-page-master-reference
- odd-or-even="even"
- master-reference="even-page"/>
+ <fo:conditional-page-master-reference page-position="first"
+ master-reference="first-page" />
+ <fo:conditional-page-master-reference odd-or-even="odd"
+ master-reference="odd-page" />
+ <fo:conditional-page-master-reference odd-or-even="even"
+ master-reference="even-page" />
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</forrest:part>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/noFt.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/noFt.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/noFt.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/noFt.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,28 +15,23 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="noFt" >
+<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
+name="noFt">
<description>
- <p>
- Error 440
- <br/>
- Template not found. This functions is a fallback when no ft is found. This
- is just a dummy, it will output *nothing*.
- </p>
+ <p>Error 440
+ <br />Template not found. This functions is a fallback when no ft is found.
+ This is just a dummy, it will output *nothing*.</p>
</description>
<usage>
-<![CDATA[<forrest:contract name="doNotUseJustDummy"/>]]>
- </usage>
- <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- format="html" name="noFt" inputFormat="xsl">
- <xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <![CDATA[<forrest:contract name="doNotUseJustDummy"/>]]>
+</usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ format="html" name="noFt" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="/">
<forrest:content>
- <forrest:part>
- Error 440 - Template not found.
- </forrest:part>
+ <forrest:part>Error 440 - Template not found.</forrest:part>
</forrest:content>
</xsl:template>
</xsl:stylesheet>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-footer-copyright.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-footer-copyright.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-footer-copyright.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-footer-copyright.contract.xml Thu Aug 27 12:07:38 2009
@@ -15,18 +15,15 @@
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="page-footer-copyright">
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0"
+name="page-footer-copyright">
<description>
- <p>
- page-footer-copyright display the footer of the pdf..
- </p>
+ <p>page-footer-copyright display the footer of the pdf..</p>
</description>
-<!-- The following are used to construct a copyright statement -->
+ <!-- The following are used to construct a copyright statement -->
<usage>
-<![CDATA[<forrest:contract name="page-footer-copyright">
+ <![CDATA[<forrest:contract name="page-footer-copyright">
<forrest:property name="copyright">
<year [inception="[true|false]"]>2005</year>
<vendor>The Acme Software Foundation.</vendor>
@@ -36,37 +33,34 @@
[<symbol>©, ®, ™...</symbol>]
</forrest:property>
</forrest:contract>]]>
- </usage>
- <forrest:template
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="page-footer-copyright" inputFormat="xsl">
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- xmlns:java="http://xml.apache.org/xslt/java"
- exclude-result-prefixes="java"
- version="1.0">
- <xsl:param name="copyright"/>
+</usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="page-footer-copyright" inputFormat="xsl">
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java"
+ version="1.0">
+ <xsl:param name="copyright" />
<xsl:variable name="symbol">
- <xsl:choose >
- <xsl:when test = "$copyright/symbol">
- <xsl:value-of select="$copyright/symbol"/>
+ <xsl:choose>
+ <xsl:when test="$copyright/symbol">
+ <xsl:value-of select="$copyright/symbol" />
</xsl:when>
<xsl:otherwise>©</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="msg">
- <xsl:choose >
- <xsl:when test = "$copyright/msg">
- <xsl:value-of select="$copyright/msg"/>
+ <xsl:choose>
+ <xsl:when test="$copyright/msg">
+ <xsl:value-of select="$copyright/msg" />
</xsl:when>
<xsl:otherwise>All rights reserved.</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="property">
- <xsl:choose >
- <xsl:when test = "$copyright/property">
- <xsl:value-of select="$copyright/property"/>
+ <xsl:choose>
+ <xsl:when test="$copyright/property">
+ <xsl:value-of select="$copyright/property" />
</xsl:when>
<xsl:otherwise>Copyright</xsl:otherwise>
</xsl:choose>
@@ -75,51 +69,48 @@
<forrest:content>
<forrest:part xpath="/fo/static-content">
<fo:static-content flow-name="first-footer">
- <xsl:call-template name="info"/>
+ <xsl:call-template name="info" />
</fo:static-content>
<fo:static-content flow-name="even-footer">
- <xsl:call-template name="info"/>
+ <xsl:call-template name="info" />
</fo:static-content>
<fo:static-content flow-name="odd-footer">
- <xsl:call-template name="info"/>
+ <xsl:call-template name="info" />
</fo:static-content>
</forrest:part>
</forrest:content>
</xsl:template>
<xsl:template name="info">
<xsl:variable name="text">
- <xsl:value-of select="$property"/> 
- <xsl:value-of select="$symbol"/> 
- <xsl:value-of select="$copyright/year"/>
- <xsl:call-template name="current-year"/> 
- <xsl:value-of select="$copyright/vendor"/> 
- <xsl:value-of select="$msg"/>
- </xsl:variable>
- <xsl:variable name="url" select="$copyright/url"/>
+ <xsl:value-of select="$property" /> 
+ <xsl:value-of select="$symbol" /> 
+ <xsl:value-of select="$copyright/year" />
+ <xsl:call-template name="current-year" /> 
+ <xsl:value-of select="$copyright/vendor" /> 
+ <xsl:value-of select="$msg" /></xsl:variable>
+ <xsl:variable name="url" select="$copyright/url" />
<fo:block-container font-style="italic" absolute-position="absolute"
- left="0pt" top="2pt" bottom="150pt" height="20pt" font-size="8pt">
+ left="0pt" top="2pt" bottom="150pt" height="20pt" font-size="8pt">
<xsl:if test="not($url)">
<fo:block text-align="center" color="lightgrey">
- <xsl:value-of select="$text"/>
+ <xsl:value-of select="$text" />
</fo:block>
</xsl:if>
<xsl:if test="$url">
<fo:block text-align="center">
- <fo:basic-link color="lightgrey"
- external-destination="{$url}">
- <xsl:value-of select="$text"/>
+ <fo:basic-link color="lightgrey" external-destination="{$url}">
+ <xsl:value-of select="$text" />
</fo:basic-link>
</fo:block>
<fo:block text-align="center">
- <fo:basic-link color="lightgrey"
- external-destination="{$url}">
- <xsl:value-of select="$url"/>
+ <fo:basic-link color="lightgrey" external-destination="{$url}">
+ <xsl:value-of select="$url" />
</fo:basic-link>
</fo:block>
</xsl:if>
</fo:block-container>
</xsl:template>
-<!-- Displays the current year after the inception year (in the copyright i.e: 2002-2005)
+ <!-- Displays the current year after the inception year (in the copyright i.e: 2002-2005)
- the year format (yyyy by default can be indicated in the dateformat parameter,
- the dates separator (- by default) can be indicated in the dateseparator parameter.
For instance the following call will format the year on 2 digits and separates the dates
@@ -136,14 +127,17 @@
<xsl:param name="dateformat">yyyy</xsl:param>
<xsl:param name="dateseparator">-</xsl:param>
<xsl:if test="$copyright/year[@inception = 'true']">
- <xsl:variable name="tz" select='java:java.util.SimpleTimeZone.new(0,"GMT+00:00")' />
- <xsl:variable name="formatter" select="java:java.text.SimpleDateFormat.new($dateformat)"/>
- <xsl:variable name="settz" select="java:setTimeZone($formatter, $tz)" />
- <xsl:variable name="date" select="java:java.util.Date.new()"/>
- <xsl:variable name="year" select="java:format($formatter, $date)"/>
+ <xsl:variable name="tz"
+ select='java:java.util.SimpleTimeZone.new(0,"GMT+00:00")' />
+ <xsl:variable name="formatter"
+ select="java:java.text.SimpleDateFormat.new($dateformat)" />
+ <xsl:variable name="settz"
+ select="java:setTimeZone($formatter, $tz)" />
+ <xsl:variable name="date" select="java:java.util.Date.new()" />
+ <xsl:variable name="year" select="java:format($formatter, $date)" />
<xsl:if test="$copyright/year != $year">
- <xsl:value-of select="$dateseparator"/>
- <xsl:value-of select="$year"/>
+ <xsl:value-of select="$dateseparator" />
+ <xsl:value-of select="$year" />
</xsl:if>
</xsl:if>
</xsl:template>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-footer-numbering.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-footer-numbering.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-footer-numbering.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-footer-numbering.contract.xml Thu Aug 27 12:07:38 2009
@@ -15,18 +15,15 @@
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="page-footer-numbering">
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0"
+name="page-footer-numbering">
<description>
- <p>
- page-footer-numbering defines the page numbering format of the pdf
- document..
- </p>
+ <p>page-footer-numbering defines the page numbering format of the pdf
+ document..</p>
</description>
<usage>
-<![CDATA[<forrest:contract name="page-footer-numbering">
+ <![CDATA[<forrest:contract name="page-footer-numbering">
[<forrest:property name="skip-first-page-numbering">[true|false]</forrest:property>]
<!--
Pattern of the page numbering in the footer - Default is "Page x".
@@ -42,94 +39,94 @@
-->
[<forrest:property name="page-numbering-format">Page 1</forrest:property>]
</forrest:contract>]]>
- </usage>
- <forrest:template
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="page-footer-numbering" inputFormat="xsl">
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
- <xsl:param name="defaultVariables" select="'test.html'"/>
- <xsl:param name="sans-serif" select="$defaultVariables/*[@name='output.pdf.fontFamily.sansSerif']/@value" />
+</usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="page-footer-numbering" inputFormat="xsl">
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+ <xsl:param name="defaultVariables" select="'test.html'" />
+ <xsl:param name="sans-serif"
+ select="$defaultVariables/*[@name='output.pdf.fontFamily.sansSerif']/@value" />
<xsl:param name="headerFooterFontFamily">
<xsl:choose>
<xsl:when test="$defaultVariables/*[@name='output.pdf.fontFamily.headerFooterFontFamily']">
- <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.headerFooterFontFamily']/@value"/>
+
+ <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.headerFooterFontFamily']/@value" />
</xsl:when>
- <xsl:otherwise><xsl:value-of select="$sans-serif"/></xsl:otherwise>
+ <xsl:otherwise>
+ <xsl:value-of select="$sans-serif" />
+ </xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="firstFooterFontFamily">
<xsl:choose>
<xsl:when test="$defaultVariables/*[@name='output.pdf.fontFamily.firstFooterFontFamily']">
- <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.firstFooterFontFamily']/@value"/>
+
+ <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.firstFooterFontFamily']/@value" />
</xsl:when>
- <xsl:otherwise><xsl:value-of select="$headerFooterFontFamily"/></xsl:otherwise>
+ <xsl:otherwise>
+ <xsl:value-of select="$headerFooterFontFamily" />
+ </xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="evenFooterFontFamily">
<xsl:choose>
<xsl:when test="$defaultVariables/*[@name='output.pdf.fontFamily.evenFooterFontFamily']">
- <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.evenFooterFontFamily']/@value"/>
+
+ <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.evenFooterFontFamily']/@value" />
</xsl:when>
- <xsl:otherwise><xsl:value-of select="$headerFooterFontFamily"/></xsl:otherwise>
+ <xsl:otherwise>
+ <xsl:value-of select="$headerFooterFontFamily" />
+ </xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="oddFooterFontFamily">
<xsl:choose>
<xsl:when test="$defaultVariables/*[@name='output.pdf.fontFamily.oddFooterFontFamily']">
- <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.oddFooterFontFamily']/@value"/>
+
+ <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.oddFooterFontFamily']/@value" />
</xsl:when>
- <xsl:otherwise><xsl:value-of select="$headerFooterFontFamily"/></xsl:otherwise>
+ <xsl:otherwise>
+ <xsl:value-of select="$headerFooterFontFamily" />
+ </xsl:otherwise>
</xsl:choose>
</xsl:param>
-<!-- Double-sided printing toggle -->
+ <!-- Double-sided printing toggle -->
<xsl:param name="doublesided" select="'true'" />
- <xsl:param name="skip-first-page-numbering" select="'true'"/>
- <xsl:param name="page-numbering-format" select="'Page 1'"/>
+ <xsl:param name="skip-first-page-numbering" select="'true'" />
+ <xsl:param name="page-numbering-format" select="'Page 1'" />
<xsl:include href="lm://pdf.transform.helper.pageNumber" />
<xsl:template match="/">
<forrest:content>
<forrest:part xpath="/fo/static-content">
- <fo:static-content
- flow-name="first-footer"
- font-family="{$firstFooterFontFamily}">
- <fo:block
- border-top="0.25pt solid"
- padding-before="6pt"
- text-align="center">
- <xsl:apply-templates select="footer"/>
+ <fo:static-content flow-name="first-footer"
+ font-family="{$firstFooterFontFamily}">
+ <fo:block border-top="0.25pt solid" padding-before="6pt"
+ text-align="center">
+ <xsl:apply-templates select="footer" />
</fo:block>
-<!-- don't list page number on first page if it's contents is just the TOC -->
- <xsl:if
- test="not($skip-first-page-numbering)">
+ <!-- don't list page number on first page if it's contents is just the TOC -->
+ <xsl:if test="not($skip-first-page-numbering)">
<xsl:call-template name="insertPageNumber">
<xsl:with-param name="text-align">start</xsl:with-param>
</xsl:call-template>
</xsl:if>
</fo:static-content>
- <fo:static-content
- flow-name="even-footer"
- font-family="{$evenFooterFontFamily}">
- <fo:block
- border-top="0.25pt solid"
- padding-before="6pt"
- text-align="center">
- <xsl:apply-templates select="footer"/>
+ <fo:static-content flow-name="even-footer"
+ font-family="{$evenFooterFontFamily}">
+ <fo:block border-top="0.25pt solid" padding-before="6pt"
+ text-align="center">
+ <xsl:apply-templates select="footer" />
</fo:block>
<xsl:call-template name="insertPageNumber">
<xsl:with-param name="text-align">end</xsl:with-param>
</xsl:call-template>
</fo:static-content>
- <fo:static-content
- flow-name="odd-footer"
- font-family="{$oddFooterFontFamily}">
- <fo:block
- border-top="0.25pt solid"
- padding-before="6pt"
- text-align="center">
- <xsl:apply-templates select="footer"/>
+ <fo:static-content flow-name="odd-footer"
+ font-family="{$oddFooterFontFamily}">
+ <fo:block border-top="0.25pt solid" padding-before="6pt"
+ text-align="center">
+ <xsl:apply-templates select="footer" />
</fo:block>
<xsl:call-template name="insertPageNumber">
<xsl:with-param name="text-align">start</xsl:with-param>
@@ -138,7 +135,6 @@
</forrest:part>
</forrest:content>
</xsl:template>
-
</xsl:stylesheet>
</forrest:template>
</forrest:contract>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-header.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-header.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-header.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/fo/page-header.contract.xml Thu Aug 27 12:07:38 2009
@@ -15,73 +15,69 @@
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="page-header">
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0" name="page-header">
<description>
- <p>
- page-header define the header of the pdf.
- </p>
+ <p>page-header define the header of the pdf.</p>
</description>
<usage>
-<![CDATA[<forrest:contract name="page-header"
+ <![CDATA[<forrest:contract name="page-header"
dataURI="cocoon://#{$getRequest}.title.xml"/>]]>
- </usage>
- <forrest:template
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="page-header" inputFormat="xsl">
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
- <xsl:param name="defaultVariables" select="'test.html'"/>
- <xsl:param name="sans-serif" select="$defaultVariables/*[@name='output.pdf.fontFamily.sansSerif']/@value" />
+</usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="page-header" inputFormat="xsl">
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+ <xsl:param name="defaultVariables" select="'test.html'" />
+ <xsl:param name="sans-serif"
+ select="$defaultVariables/*[@name='output.pdf.fontFamily.sansSerif']/@value" />
<xsl:param name="headerFooterFontFamily">
<xsl:choose>
<xsl:when test="$defaultVariables/*[@name='output.pdf.fontFamily.headerFooterFontFamily']">
- <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.headerFooterFontFamily']/@value"/>
+
+ <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.headerFooterFontFamily']/@value" />
</xsl:when>
- <xsl:otherwise><xsl:value-of select="$sans-serif"/></xsl:otherwise>
+ <xsl:otherwise>
+ <xsl:value-of select="$sans-serif" />
+ </xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="evenHeaderFontFamily">
<xsl:choose>
<xsl:when test="$defaultVariables/*[@name='output.pdf.fontFamily.evenHeaderFontFamily']">
- <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.evenHeaderFontFamily']/@value"/>
+
+ <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.evenHeaderFontFamily']/@value" />
</xsl:when>
- <xsl:otherwise><xsl:value-of select="$headerFooterFontFamily"/></xsl:otherwise>
+ <xsl:otherwise>
+ <xsl:value-of select="$headerFooterFontFamily" />
+ </xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="oddHeaderFontFamily">
<xsl:choose>
<xsl:when test="$defaultVariables/*[@name='output.pdf.fontFamily.oddHeaderFontFamily']">
- <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.oddHeaderFontFamily']/@value"/>
+
+ <xsl:value-of select="$defaultVariables/*[@name='output.pdf.fontFamily.oddHeaderFontFamily']/@value" />
</xsl:when>
- <xsl:otherwise><xsl:value-of select="$headerFooterFontFamily"/></xsl:otherwise>
+ <xsl:otherwise>
+ <xsl:value-of select="$headerFooterFontFamily" />
+ </xsl:otherwise>
</xsl:choose>
</xsl:param>
-<!-- Double-sided printing toggle -->
+ <!-- Double-sided printing toggle -->
<xsl:param name="doublesided" select="'true'" />
<xsl:template match="/">
<forrest:content>
<forrest:part xpath="/fo/page-sequence">
- <fo:static-content
- flow-name="even-header"
- font-family="{$evenHeaderFontFamily}">
- <fo:block
- font-size="70%"
- text-align="end"
- font-style="italic">
- <xsl:value-of select="title"/>
+ <fo:static-content flow-name="even-header"
+ font-family="{$evenHeaderFontFamily}">
+ <fo:block font-size="70%" text-align="end" font-style="italic">
+ <xsl:value-of select="title" />
</fo:block>
</fo:static-content>
- <fo:static-content
- flow-name="odd-header"
- font-family="{$oddHeaderFontFamily}">
- <fo:block
- font-size="70%"
- font-style="italic">
+ <fo:static-content flow-name="odd-header"
+ font-family="{$oddHeaderFontFamily}">
+ <fo:block font-size="70%" font-style="italic">
<xsl:choose>
<xsl:when test="$doublesided = 'true'">
<xsl:attribute name="text-align">start</xsl:attribute>
@@ -90,7 +86,7 @@
<xsl:attribute name="text-align">end</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
- <xsl:value-of select="title"/>
+ <xsl:value-of select="title" />
</fo:block>
</fo:static-content>
</forrest:part>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/ajax-example.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/ajax-example.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/ajax-example.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/ajax-example.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,37 +15,36 @@
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="ajax-example">
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0" name="ajax-example">
<description>
- <p>
- This contract is an example how to use ajax in forrest.
- </p>
+ <p>This contract is an example how to use ajax in forrest.</p>
<div class="warning">
<div class="label">Warning</div>
- <div class="content">You need to include <![CDATA[<forrest:contract name="helper-prototype-ajax"/>]]>
- in your view!!! If you are not, it will not work.</div>
+ <div class="content">You need to include
+<![CDATA[<forrest:contract name="helper-prototype-ajax"/>]]>
+in your view!!! If you are not, it will not work.</div>
</div>
<div class="warning">
<div class="label">Warning</div>
- <div class="content">This example <strong>only</strong> works in <strong>http://localhost:8888/</strong>.</div>
+ <div class="content">This example
+ <strong>only</strong>works in
+ <strong>http://localhost:8888/</strong>.</div>
</div>
</description>
<usage>
-<![CDATA[<forrest:contract name="ajax-example"/>]]>
- </usage>
+ <![CDATA[<forrest:contract name="ajax-example"/>]]>
+</usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="ajax-example" inputFormat="xsl">
- <xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ name="ajax-example" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="ajax-example-head" />
<xsl:template match="/">
<forrest:content>
<forrest:part xpath="/html/head">
-<script type="text/javascript">
- <![CDATA[function preview(div){
+ <script type="text/javascript">
+ <![CDATA[ function preview(div){
$(div).innerHTML="please stand by";
var url = 'http://localhost:8888/less.contract.project-ajax-example.xml';
new Ajax.Updater({success: div}, url, {method: 'get', onFailure: reportError});
@@ -53,24 +52,24 @@
function reportError(request){
alert('Sorry. There was an error.');
}]]>
- </script>
- </forrest:part>
+ </script>
+ </forrest:part>
</forrest:content>
</xsl:template>
<xsl:template name="ajax-example-body">
- <forrest:content>
- <forrest:part>
- <div class="warning">
- <div class="label">Warning</div>
- <div class="content">This example <strong>only</strong> works in <strong>http://localhost:8888/</strong>.</div>
- </div>
- <p>
- This is an example how to use AJAX in forrest. The
- <a href="javascript:preview('testDiv')">test</a> will update the
- testDiv with the output of url =
- 'http://localhost:8888/less.contract.project-ajax-example.xml';
- </p>
- <div id="testDiv">testDiv</div>
+ <forrest:content>
+ <forrest:part>
+ <div class="warning">
+ <div class="label">Warning</div>
+ <div class="content">This example
+ <strong>only</strong>works in
+ <strong>http://localhost:8888/</strong>.</div>
+ </div>
+ <p>This is an example how to use AJAX in forrest. The
+ <a href="javascript:preview('testDiv')">test</a>will update the
+ testDiv with the output of url =
+ 'http://localhost:8888/less.contract.project-ajax-example.xml';</p>
+ <div id="testDiv">testDiv</div>
</forrest:part>
</forrest:content>
</xsl:template>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/apache-ssi.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/apache-ssi.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/apache-ssi.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/apache-ssi.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,44 +15,37 @@
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="apache-ssi">
- <description>
- apache-ssi will output a ssi include link for the Apache webserver. You can
- either use "virtual" or "file" includes. Will output something like:
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0" name="apache-ssi">
+ <description>apache-ssi will output a ssi include link for the Apache
+ webserver. You can either use "virtual" or "file" includes. Will output
+ something like:
<![CDATA[<!--#include virtual="file.html" -->]]>
- </description>
+</description>
<usage>
-<![CDATA[<forrest:contract name="apache-ssi">
+ <![CDATA[<forrest:contract name="apache-ssi">
<forrest:property name="includeType">virtual|file</forrest:property>
<forrest:property name="includePath">index.html</forrest:property>
</forrest:contract>]]>
- </usage>
+</usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="apache-ssi" inputFormat="xsl">
- <xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:param name="includeType" select="'virtual|file'"/>
- <xsl:param name="includePath" select="'../index.html'"/>
+ name="apache-ssi" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="includeType" select="'virtual|file'" />
+ <xsl:param name="includePath" select="'../index.html'" />
<xsl:template match="/">
<forrest:content>
<forrest:part>
- <xsl:variable name="output"> #include
- <xsl:choose>
- <xsl:when test="$includeType='virtual'">
- virtual="
- <xsl:value-of select="$includePath"/>"
- </xsl:when>
- <xsl:otherwise> file="
- <xsl:value-of select="$includePath"/>"
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
+ <xsl:variable name="output">#include
+ <xsl:choose>
+ <xsl:when test="$includeType='virtual'">virtual="
+ <xsl:value-of select="$includePath" />"</xsl:when>
+ <xsl:otherwise>file="
+ <xsl:value-of select="$includePath" />"</xsl:otherwise>
+ </xsl:choose></xsl:variable>
<xsl:comment>
- <xsl:value-of
- select="normalize-space($output)"/>
+ <xsl:value-of select="normalize-space($output)" />
</xsl:comment>
</forrest:part>
</forrest:content>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/blank.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/blank.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/blank.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/blank.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,29 +15,25 @@
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="blank">
-<!--NOTE:
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0" name="blank">
+ <!--NOTE:
When using the blank template as c'n p master just search and replace 'blank' by the {contract-name}!-->
- <description>
- blank will output {contract-funtion}. This is just a blank contract, it will
- output *nothing*.
- </description>
+ <description>blank will output {contract-funtion}. This is just a blank
+ contract, it will output *nothing*.</description>
<usage>
-<![CDATA[<forrest:contract name="blank"/>]]>
- </usage>
+ <![CDATA[<forrest:contract name="blank"/>]]>
+</usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="blank" inputFormat="xsl">
- <xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<!--<xsl:param name="defaultVariables" select="'test.html'"/>-->
-<!--<xsl:variable name="skin-img-dir" select="$defaultVariables/*[@name='skin-img-dir']/@value"/>-->
+ name="blank" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <!--<xsl:param name="defaultVariables" select="'test.html'"/>-->
+ <!--<xsl:variable name="skin-img-dir" select="$defaultVariables/*[@name='skin-img-dir']/@value"/>-->
<xsl:template match="/">
<forrest:content>
-<!--<forrest:part/>-->
-<!--<forrest:part xpath="/html/head"/>-->
+ <!--<forrest:part/>-->
+ <!--<forrest:part xpath="/html/head"/>-->
</forrest:content>
</xsl:template>
</xsl:stylesheet>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-breadcrumbs.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-breadcrumbs.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-breadcrumbs.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-breadcrumbs.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -16,12 +16,10 @@
limitations under the License.
-->
<forrest:contract name="branding-breadcrumbs"
- xmlns:forrest="http://apache.org/forrest/templates/1.0">
- <description>
- branding-breadcrumbs will output the breadcrumbs.
- </description>
+xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <description>branding-breadcrumbs will output the breadcrumbs.</description>
<usage>
-<![CDATA[<forrest:contract name="branding-breadcrumbs">
+ <![CDATA[<forrest:contract name="branding-breadcrumbs">
<forrest:property name="branding-breadcrumbs">
<trail>
<link1 name="Apache Forrest" href="http://forrest.apache.org/"/>
@@ -30,42 +28,41 @@
</trail>
</forrest:property>
</forrest:contract>]]>
- </usage>
- <forrest:template
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="branding-breadcrumbs" inputFormat="xsl">
- <xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:param name="defaultVariables" select="'test.html'"/>
- <xsl:param name="branding-breadcrumbs"/>
- <xsl:variable name="root" select="$defaultVariables/*[@name='root']/@value"/>
+</usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="branding-breadcrumbs" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="defaultVariables" select="'test.html'" />
+ <xsl:param name="branding-breadcrumbs" />
+ <xsl:variable name="root"
+ select="$defaultVariables/*[@name='root']/@value" />
<xsl:template match="/">
<forrest:content>
<forrest:part>
-<!--breadcrumbs org location-->
- <xsl:comment>+
- | start breadtrail
- +</xsl:comment>
+ <!--breadcrumbs org location-->
+ <xsl:comment>+ | start breadtrail +</xsl:comment>
<div class="breadtrail">
- <xsl:if
- test="($branding-breadcrumbs/trail/link1/@name)and($branding-breadcrumbs/trail/link1/@name!='')"><a href="{$branding-breadcrumbs/trail/link1/@href}">
- <xsl:value-of select="$branding-breadcrumbs/trail/link1/@name"/></a>
- </xsl:if>
- <xsl:if
- test="($branding-breadcrumbs/trail/link2/@name)and($branding-breadcrumbs/trail/link2/@name!='')">
- > <a href="{$branding-breadcrumbs/trail/link2/@href}">
- <xsl:value-of select="$branding-breadcrumbs/trail/link2/@name"/></a>
- </xsl:if>
- <xsl:if
- test="($branding-breadcrumbs/trail/link3/@name)and($branding-breadcrumbs/trail/link3/@name!='')">
- > <a href="{$branding-breadcrumbs/trail/link3/@href}">
- <xsl:value-of select="$branding-breadcrumbs/trail/link3/@name"/></a>
+ <xsl:if test="($branding-breadcrumbs/trail/link1/@name)and($branding-breadcrumbs/trail/link1/@name!='')">
+
+ <a href="{$branding-breadcrumbs/trail/link1/@href}">
+ <xsl:value-of select="$branding-breadcrumbs/trail/link1/@name" />
+ </a>
</xsl:if>
-<script type="text/javascript" src="{$root}themes/breadcrumbs.js"> </script>
+ <xsl:if test="($branding-breadcrumbs/trail/link2/@name)and($branding-breadcrumbs/trail/link2/@name!='')">
+ >
+ <a href="{$branding-breadcrumbs/trail/link2/@href}">
+ <xsl:value-of select="$branding-breadcrumbs/trail/link2/@name" />
+ </a></xsl:if>
+ <xsl:if test="($branding-breadcrumbs/trail/link3/@name)and($branding-breadcrumbs/trail/link3/@name!='')">
+ >
+ <a href="{$branding-breadcrumbs/trail/link3/@href}">
+ <xsl:value-of select="$branding-breadcrumbs/trail/link3/@name" />
+ </a></xsl:if>
+ <script type="text/javascript"
+ src="{$root}themes/breadcrumbs.js"> </script>
</div>
- <xsl:comment>+
- | end breadtrail
- +</xsl:comment>
+ <xsl:comment>+ | end breadtrail +</xsl:comment>
</forrest:part>
</forrest:content>
</xsl:template>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-css-links.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-css-links.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-css-links.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-css-links.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,179 +15,184 @@
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="branding-css-links">
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0"
+name="branding-css-links">
<description>
- <p>
- branding-css-links will output html link elements for css usage.
- </p>
-
- <p>
- The contract includes css files which are passed in parameter with the
- following syntax :
- </p>
+ <p>branding-css-links will output html link elements for css usage.</p>
+ <p>The contract includes css files which are passed in parameter with the
+ following syntax :</p>
<source>
-<![CDATA[<css url="layout.]]><em>media</em>.css" [media="screen|print"] [theme="themeName"]<![CDATA[/>]]>
- </source>
+<![CDATA[<css url="layout.]]>
+<em>media</em>.css" [media="screen|print"] [theme="themeName"]
+<![CDATA[/>]]>
+</source>
<ul>
- <li><strong>url</strong> attribute indicates the name of the css file, the dispatcher
- searches for this file in the following order :
- <ul>
- <li>Does the css file exists in the following directory - if yes, use this one :
- <source>$PROJECT_HOME/src/documentation/resources/themes/yourtheme/css/</source></li>
- <li>Otherwise, does the css file exists in the following directory - if yes, use this one :
- <source>$FORREST_HOME/whiteboard/plugins/org.apache.forrest.themes.core/resources/themes/yourtheme/css/</source></li>
- <li>Otherwise, does the css file exists in the following directory - if yes, use this one :
- <source>$FORREST_HOME/whiteboard/plugins/org.apache.forrest.themes.core/resources/themes/common/css/</source></li>
- </ul>
- The <strong>url</strong> attribute is required.
- </li>
- <li><strong>media</strong> attribute indicates to the browser the stylesheets to use
- depending on the detination media :
- <ul>
- <li><em>screen</em> : the stylesheet is used with the browser displaying the page on the screen,</li>
- <li><em>print</em> : the stylesheet is used while printing the document - or print preview...</li>
- <li>othervalues can also be managed by browsers.cf. <a href="http://www.w3.org/TR/REC-CSS2/media.html#media-types" class="fork">W3C Media Types</a>.</li>
- </ul>
- <div class="note">
- <div class="label">Firefox has a bug !</div>
- <div class="content">
- <p>
- There is a bug with firefox which does not manage media attribute
- while printing, the bug is already declared twice in bugzilla, so
- we are waiting...
- </p>
- </div>
- </div></li>
- <li><strong>theme</strong> attribute indicates to the browser for which theme this
- stylesheet should be used, letting you add several css files
- corresponding to different themes of the same page.<br/>
- If omitted, the <strong>theme</strong> attribute take the value of the <code>dispatcher.theme</code> property that you should have defined in your forrest.properties.xml file.
- </li>
+ <li>
+ <strong>url</strong>attribute indicates the name of the css file, the
+ dispatcher searches for this file in the following order :
+ <ul>
+ <li>Does the css file exists in the following directory - if yes, use
+ this one :
+ <source>
+ $PROJECT_HOME/src/documentation/resources/themes/yourtheme/css/</source></li>
+ <li>Otherwise, does the css file exists in the following directory - if
+ yes, use this one :
+ <source>
+ $FORREST_HOME/whiteboard/plugins/org.apache.forrest.themes.core/resources/themes/yourtheme/css/</source></li>
+ <li>Otherwise, does the css file exists in the following directory - if
+ yes, use this one :
+ <source>
+ $FORREST_HOME/whiteboard/plugins/org.apache.forrest.themes.core/resources/themes/common/css/</source></li>
+ </ul>The
+ <strong>url</strong>attribute is required.</li>
+ <li>
+ <strong>media</strong>attribute indicates to the browser the stylesheets
+ to use depending on the detination media :
+ <ul>
+ <li>
+ <em>screen</em>: the stylesheet is used with the browser displaying the
+ page on the screen,</li>
+ <li>
+ <em>print</em>: the stylesheet is used while printing the document - or
+ print preview...</li>
+ <li>othervalues can also be managed by browsers.cf.
+ <a href="http://www.w3.org/TR/REC-CSS2/media.html#media-types"
+ class="fork">W3C Media Types</a>.</li>
+ </ul>
+ <div class="note">
+ <div class="label">Firefox has a bug !</div>
+ <div class="content">
+ <p>There is a bug with firefox which does not manage media attribute
+ while printing, the bug is already declared twice in bugzilla, so we
+ are waiting...</p>
+ </div>
+ </div></li>
+ <li>
+ <strong>theme</strong>attribute indicates to the browser for which theme
+ this stylesheet should be used, letting you add several css files
+ corresponding to different themes of the same page.
+ <br />If omitted, the
+ <strong>theme</strong>attribute take the value of the
+ <code>dispatcher.theme</code>property that you should have defined in
+ your forrest.properties.xml file.</li>
</ul>
</description>
<usage>
-<![CDATA[<forrest:contract name="branding-css-links">
+ <![CDATA[<forrest:contract name="branding-css-links">
<forrest:property name="branding-css-links-input">
<css url="common.css"/>
<css if="IE 7" .../>
<css .../>
</forrest:property>
</forrest:contract>]]>
- </usage>
+</usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="branding-css-links" inputFormat="xsl">
- <xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:forrest="http://apache.org/forrest/templates/1.0">
- <xsl:param name="defaultVariables" select="'test.html'"/>
- <xsl:param name="branding-css-links-input"/>
- <xsl:variable name="root" select="$defaultVariables/*[@name='root']/@value"/>
- <xsl:variable name="theme" select="$defaultVariables/*[@name='theme']/@value"/>
+ name="branding-css-links" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <xsl:param name="defaultVariables" select="'test.html'" />
+ <xsl:param name="branding-css-links-input" />
+ <xsl:variable name="root"
+ select="$defaultVariables/*[@name='root']/@value" />
+ <xsl:variable name="theme"
+ select="$defaultVariables/*[@name='theme']/@value" />
<xsl:template match="/">
<forrest:content>
<forrest:part xpath="/html/head">
- <xsl:apply-templates select="$branding-css-links-input/*"/>
+ <xsl:apply-templates select="$branding-css-links-input/*" />
</forrest:part>
</forrest:content>
</xsl:template>
- <xsl:template
- match="css[@url]">
- <xsl:variable name="if" select="normalize-space(@if)"/>
+ <xsl:template match="css[@url]">
+ <xsl:variable name="if" select="@if" />
<xsl:choose>
<xsl:when test="$if">
- <xsl:variable name="ifComment"
- select="concat('[if ',$if,']>')"/>
- <xsl:comment><xsl:value-of select="$ifComment"/>
- <xsl:call-template name="printLinkText"/>
- <![endif]</xsl:comment>
+ <xsl:comment>[if
+ <xsl:value-of select="$if" />]>
+ <xsl:call-template name="printLinkText" /><![endif]</xsl:comment>
</xsl:when>
<xsl:otherwise>
- <xsl:call-template name="printLink"/>
+ <xsl:call-template name="printLink" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="printLink">
<link type="text/css">
- <xsl:choose>
- <xsl:when test="@rel">
- <xsl:attribute name="rel">
- <xsl:value-of select="normalize-space(@rel)"/>
- </xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="rel">stylesheet</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="@theme">
- <xsl:attribute name="title">
- <xsl:value-of select="normalize-space(@theme)"/>
- </xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="title">
- <xsl:value-of select="concat( translate( substring($theme, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($theme,2))"/>
- </xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:variable name="prefix">
<xsl:choose>
- <xsl:when test="@prefix">
- <xsl:value-of select="normalize-space(@prefix)"/>
+ <xsl:when test="@rel">
+ <xsl:attribute name="rel">
+ <xsl:value-of select="@rel" />
+ </xsl:attribute>
</xsl:when>
<xsl:otherwise>
- themes/
- </xsl:otherwise>
+ <xsl:attribute name="rel">stylesheet</xsl:attribute>
+ </xsl:otherwise>
</xsl:choose>
- </xsl:variable>
- <xsl:attribute name="href">
- <xsl:value-of
- select="$root"/>
- <xsl:value-of
- select="normalize-space($prefix)"/>
- <xsl:value-of
- select="@url"/>
- </xsl:attribute>
- <xsl:if test="@media">
- <xsl:attribute name="media">
- <xsl:value-of select="normalize-space(@media)"/>
- </xsl:attribute>
- </xsl:if></link>
- </xsl:template>
- <xsl:template name="printLinkText">
- <xsl:variable name="out">
- <link type="text/css"
- <xsl:choose>
- <xsl:when test="@rel"> rel="<xsl:value-of select="normalize-space(@rel)"/>" </xsl:when>
- <xsl:otherwise> rel="stylesheet" </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="@theme">
+ <xsl:attribute name="title">
+ <xsl:value-of select="@theme" />
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="title">
+ <xsl:value-of select="concat( translate( substring($theme, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($theme,2))" />
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:variable name="prefix">
<xsl:choose>
- <xsl:when test="@theme"> title="<xsl:value-of select="normalize-space(@theme)"/>" </xsl:when>
- <xsl:otherwise> title="<xsl:value-of
- select="concat( translate( substring($theme, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($theme,2))"/>
- " </xsl:otherwise>
+ <xsl:when test="@prefix">
+ <xsl:value-of select="@prefix" />
+ </xsl:when>
+ <xsl:otherwise>themes/</xsl:otherwise>
</xsl:choose>
- <xsl:variable name="prefix">
- <xsl:choose>
- <xsl:when test="@prefix">
- <xsl:value-of select="normalize-space(@prefix)"/>
- </xsl:when>
- <xsl:otherwise>themes/</xsl:otherwise>
- </xsl:choose>
- </xsl:variable> href="<xsl:value-of select="$root"/>
- <xsl:value-of select="normalize-space($prefix)"/>
- <xsl:value-of select="normalize-space(@url)"/>"
- <xsl:if test="@media"> media="<xsl:value-of select="normalize-space(@media)"/>"</xsl:if>
- </xsl:variable>
- <xsl:variable name="printIt"
- select="concat(normalize-space($out),'/>')"/>
- <xsl:value-of select="normalize-space($printIt)"/></xsl:template>
+ </xsl:variable>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$root" />
+ <xsl:value-of select="normalize-space($prefix)" />
+ <xsl:value-of select="@url" />
+ </xsl:attribute>
+ <xsl:if test="@media">
+ <xsl:attribute name="media">
+ <xsl:value-of select="@media" />
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+ </xsl:template>
+ <xsl:template name="printLinkText">
+ <xsl:variable name="out">
+ <xsl:choose>
+ <xsl:when test="@rel">rel="
+ <xsl:value-of select="@rel" />"</xsl:when>
+ <xsl:otherwise>rel="stylesheet"</xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="@theme">title="
+ <xsl:value-of select="@theme" />"</xsl:when>
+ <xsl:otherwise>title="
+ <xsl:value-of select="concat( translate( substring($theme, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($theme,2))" />"</xsl:otherwise>
+ </xsl:choose>
+ <xsl:variable name="prefix">
+ <xsl:choose>
+ <xsl:when test="@prefix">
+ <xsl:value-of select="@prefix" />
+ </xsl:when>
+ <xsl:otherwise>themes/</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>href="
+ <xsl:value-of select="$root" />
+ <xsl:value-of select="normalize-space($prefix)" />
+ <xsl:value-of select="@url" />
+ <xsl:if test="@media">" media="
+ <xsl:value-of select="@media" />"</xsl:if></xsl:variable><link
+ type="text/css"
+ <xsl:value-of select="normalize-space($out)" />></xsl:template>
<xsl:template match="css[not(@url)]">
<style type="text/css">
- <xsl:value-of select="."/>
+ <xsl:value-of select="." />
</style>
</xsl:template>
</xsl:stylesheet>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-fontsize.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-fontsize.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-fontsize.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-fontsize.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -16,30 +16,35 @@
limitations under the License.
-->
<forrest:contract name="branding-fontsize"
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
- xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
- <description>
- branding-fontsize lets users change the size of the font via javascript.
- </description>
+xmlns:forrest="http://apache.org/forrest/templates/1.0"
+xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+ <description>branding-fontsize lets users change the size of the font via
+ javascript.</description>
<usage>
-<![CDATA[<forrest:contract name="branding-fontsize"/>]]>
- </usage>
- <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0" name="branding-fontsize" inputFormat="xsl">
- <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:param name="defaultVariables"/>
- <xsl:variable name="root" select="$defaultVariables/*[@name='root']/@value"/>
+ <![CDATA[<forrest:contract name="branding-fontsize"/>]]>
+</usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="branding-fontsize" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="defaultVariables" />
+ <xsl:variable name="root"
+ select="$defaultVariables/*[@name='root']/@value" />
<xsl:template match="/">
<forrest:content>
<forrest:part xpath="/html/head">
-<script type="text/javascript" src="{$root}themes/fontsize.js"> </script>
+ <script type="text/javascript" src="{$root}themes/fontsize.js">
+  </script>
</forrest:part>
<forrest:part>
-<script type="text/javascript">ndeSetTextSize();</script>
- <i18n:text >Font size:</i18n:text>
-  <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"/>
- </forrest:part>
+ <script type="text/javascript">ndeSetTextSize();</script>
+ <i18n:text>Font size:</i18n:text> 
+ <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" /></forrest:part>
</forrest:content>
</xsl:template>
</xsl:stylesheet>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-logo.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-logo.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-logo.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-logo.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -16,24 +16,29 @@
limitations under the License.
-->
<forrest:contract name="branding-logo"
- xmlns:forrest="http://apache.org/forrest/templates/1.0">
+xmlns:forrest="http://apache.org/forrest/templates/1.0">
<description>
- <p>
- This contract will output images. You can configure it like follow:
- </p>
+ <p>This contract will output images. You can configure it like follow:</p>
<ul>
- <li>branding-logo-name - will be used for @alt value of the <img> </li>
- <li>branding-logo-description - will be used for @title value of the <img> </li>
- <li>branding-logo-url - will be used for the @href location of a surrounding <a> </li>
- <li>branding-logo-logo - will be used for @src value of the <img> </li>
- <li>branding-logo-over - if used then a javascript will be rendered which switches the images.
- Will be used for @onmouseover image @src value of the <img> </li>
- <li>branding-logo-width - will be used for @width value of the <img> </li>
- <li>branding-logo-height - will be used for @height value of the <img> </li>
+ <li>branding-logo-name - will be used for @alt value of the
+ <img></li>
+ <li>branding-logo-description - will be used for @title value of the
+ <img></li>
+ <li>branding-logo-url - will be used for the @href location of a
+ surrounding <a></li>
+ <li>branding-logo-logo - will be used for @src value of the
+ <img></li>
+ <li>branding-logo-over - if used then a javascript will be rendered which
+ switches the images. Will be used for @onmouseover image @src value of
+ the <img></li>
+ <li>branding-logo-width - will be used for @width value of the
+ <img></li>
+ <li>branding-logo-height - will be used for @height value of the
+ <img></li>
</ul>
</description>
<usage>
-<![CDATA[<forrest:contract name="branding-logo">
+ <![CDATA[<forrest:contract name="branding-logo">
<forrest:property name="branding-logo-name">Apache Forrest</forrest:property>
<forrest:property name="branding-logo-description">Apache Forrest</forrest:property>
<forrest:property name="branding-logo-url">http://forrest.apache.org/</forrest:property>
@@ -42,42 +47,44 @@
[<forrest:property name="branding-logo-width">500</forrest:property>]
[<forrest:property name="branding-logo-height">490</forrest:property>]
</forrest:contract>]]>
- </usage>
- <forrest:template
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
+</usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
name="branding-logo" inputFormat="xsl">
- <xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:include href="cocoon://prepare.contract.html.helper-render-image"/>
- <xsl:param name="defaultVariables" select="'test.html'"/>
- <xsl:param name="branding-logo-name"/>
- <xsl:param name="branding-logo-description"/>
- <xsl:param name="branding-logo-url"/>
- <xsl:param name="branding-logo-logo"/>
- <xsl:param name="branding-logo-over"/>
- <xsl:param name="branding-logo-width"/>
- <xsl:param name="branding-logo-height"/>
- <xsl:variable name="root" select="$defaultVariables/*[@name='root']/@value"/>
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="cocoon://prepare.contract.html.helper-render-image" />
+ <xsl:param name="defaultVariables" select="'test.html'" />
+ <xsl:param name="branding-logo-name" />
+ <xsl:param name="branding-logo-description" />
+ <xsl:param name="branding-logo-url" />
+ <xsl:param name="branding-logo-logo" />
+ <xsl:param name="branding-logo-over" />
+ <xsl:param name="branding-logo-width" />
+ <xsl:param name="branding-logo-height" />
+ <xsl:variable name="root"
+ select="$defaultVariables/*[@name='root']/@value" />
<xsl:template match="/">
<forrest:content>
<forrest:part>
- <xsl:comment>+
- |start Logo
- +</xsl:comment>
+ <xsl:comment>+ |start Logo +</xsl:comment>
<xsl:call-template name="renderlogo">
- <xsl:with-param name="name" select="normalize-space($branding-logo-name)"/>
- <xsl:with-param name="url" select="normalize-space($branding-logo-url)"/>
- <xsl:with-param name="logo" select="normalize-space($branding-logo-logo)"/>
- <xsl:with-param name="rollover" select="normalize-space($branding-logo-over)"/>
- <xsl:with-param name="width" select="normalize-space($branding-logo-width)"/>
- <xsl:with-param name="height" select="normalize-space($branding-logo-height)"/>
- <xsl:with-param name="root" select="$root"/>
- <xsl:with-param name="description"
- select="normalize-space($branding-logo-description)"/>
+ <xsl:with-param name="name"
+ select="normalize-space($branding-logo-name)" />
+ <xsl:with-param name="url"
+ select="normalize-space($branding-logo-url)" />
+ <xsl:with-param name="logo"
+ select="normalize-space($branding-logo-logo)" />
+ <xsl:with-param name="rollover"
+ select="normalize-space($branding-logo-over)" />
+ <xsl:with-param name="width"
+ select="normalize-space($branding-logo-width)" />
+ <xsl:with-param name="height"
+ select="normalize-space($branding-logo-height)" />
+ <xsl:with-param name="root" select="$root" />
+ <xsl:with-param name="description"
+ select="normalize-space($branding-logo-description)" />
</xsl:call-template>
- <xsl:comment>+
- |end group Logo
- +</xsl:comment>
+ <xsl:comment>+ |end group Logo +</xsl:comment>
</forrest:part>
</forrest:content>
</xsl:template>
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-tagline.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-tagline.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-tagline.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/branding-tagline.contract.xml Thu Aug 27 12:07:38 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,33 +15,32 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="branding-tagline">
- <description>
- branding-tagline will output the site name and tagline.
- </description>
+<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
+name="branding-tagline">
+ <description>branding-tagline will output the site name and
+ tagline.</description>
<usage>
-<![CDATA[<forrest:contract name="branding-tagline">
+ <![CDATA[<forrest:contract name="branding-tagline">
<forrest:property name="branding-tagline-name">new seed</forrest:property>
<forrest:property name="branding-tagline-tagline">powered by
forrest:structurer</forrest:property>
</forrest:contract>]]>
- </usage>
- <forrest:template xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
- xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="branding-tagline" inputFormat="xsl">
- <xsl:stylesheet version="1.1"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:param name="branding-tagline-name"/>
- <xsl:param name="branding-tagline-tagline"/>
+</usage>
+ <forrest:template xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="branding-tagline" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="branding-tagline-name" />
+ <xsl:param name="branding-tagline-tagline" />
<xsl:template match="/">
<forrest:content>
<forrest:part>
<div id="branding-tagline-name">
- <xsl:value-of select="$branding-tagline-name"/>
+ <xsl:value-of select="$branding-tagline-name" />
</div>
<div id="branding-tagline-tagline">
- <xsl:value-of select="$branding-tagline-tagline"/>
+ <xsl:value-of select="$branding-tagline-tagline" />
</div>
</forrest:part>
</forrest:content>