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 2004/11/05 15:02:03 UTC
svn commit: rev 56662 - forrest/trunk/main/webapp/skins/leather-dev/xslt/xml
Author: thorsten
Date: Fri Nov 5 06:02:02 2004
New Revision: 56662
Added:
forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/ft-leather.xml (contents, props changed)
forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/ft2xhtml.xsl (contents, props changed)
Modified:
forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/dir2contracts.xsl
forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/sitemap.xmap
Log:
implemended first ft
Modified: forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/dir2contracts.xsl
==============================================================================
--- forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/dir2contracts.xsl (original)
+++ forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/dir2contracts.xsl Fri Nov 5 06:02:02 2004
@@ -40,10 +40,7 @@
</xsl:variable>
<xsl:if test="$fct-bit-tlc='content'">
<content>
- <contract name="{$fct-bit-title}">
- <css-contract>
- <xsl:value-of select="$fct-bit-nc"/>
- </css-contract>
+ <contract name="{$fct-bit-title}" css="{$fct-bit-nc}" file-name="{@name}">
<description>
<xsl:value-of select="$fct-bit-description"/>
</description>
Added: forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/ft-leather.xml
==============================================================================
--- (empty file)
+++ forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/ft-leather.xml Fri Nov 5 06:02:02 2004
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<forrest-template>
+ <hook name="content">
+ <contract name="fontsize"/>
+ </hook>
+</forrest-template>
Added: forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/ft2xhtml.xsl
==============================================================================
--- (empty file)
+++ forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/ft2xhtml.xsl Fri Nov 5 06:02:02 2004
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--
+site2xml.xsl is the final stage in XML page production. It merges HTML from
+document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
+footer, searchbar, css etc. As input, it takes XML of the form:
+
+<elements>
+ <branding/>
+ <search/>
+ <menu/>
+ <content/>
+ <siteinfo/>
+</elements>
+
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:import href="fct-bits/fct-bits.xsl"/>
+ <xsl:param name="contextPath"/>
+
+ <!--+
+ |Overall site template
+ +-->
+ <xsl:template match="/">
+ <ft>
+ <xsl:apply-templates />
+ </ft>
+ </xsl:template>
+ <xsl:template match="hook">
+ <div id="{@name}">
+ <xsl:apply-templates />
+ </div>
+ </xsl:template>
+ <xsl:template match="contract">
+ <div id="{@name}">
+ <xsl:apply-templates />
+ </div>
+ </xsl:template>
+</xsl:stylesheet>
Modified: forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/sitemap.xmap
==============================================================================
--- forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/sitemap.xmap (original)
+++ forrest/trunk/main/webapp/skins/leather-dev/xslt/xml/sitemap.xmap Fri Nov 5 06:02:02 2004
@@ -54,7 +54,6 @@
<map:pipelines>
<map:pipeline>
-
<map:match pattern="">
<map:generate src="fct-bits/c-fontsize-fct.xml"/>
<map:transform src="contract.xsl">
@@ -62,15 +61,28 @@
</map:transform>
<map:serialize type="xml"/>
</map:match>
+ </map:pipeline>
- <!-- ======================== Automount =============================== -->
-
- <map:match pattern="*/**">
- <map:mount uri-prefix="{1}" src="{1}/" check-reload="yes"/>
- </map:match>
-
- </map:pipeline>
-
+ <!--
+1. check all aviable fct
+2. check which fct are needed
+3. check where to place them
+4. output the xhtml
+-->
+<!--
+1. check all aviable fct
+output e.g.
+<contracts>
+ <content>
+ <contract file-name="c-fontsize-fct.xml" css="fontsize" name="fontsize-fct">
+ <description>
+ This functions lets you change the size of the font you are using in the site with a jscript.
+ </description>
+ <realpath>/home/thorsten/apache/cocoon-2.1.5.1/build/webapp/leather/fct-bits/c-fontsize-fct.xml</realpath>
+ </contract>
+ </content>
+</contracts>
+-->
<map:pipeline>
<map:match pattern="contracts.xml">
<map:generate type="directory" src="fct-bits">
@@ -84,6 +96,15 @@
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
-
+
+ <map:pipeline>
+ <map:match pattern="ft">
+ <map:generate src="ft-leather.xml"/>
+ <map:transform src="ft2xhtml.xsl">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
</map:pipelines>
</map:sitemap>