You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ni...@apache.org on 2003/10/16 17:16:09 UTC
cvs commit: xml-forrest/src/resources/fresh-site forrest.properties
nicolaken 2003/10/16 08:16:09
Modified: src/resources/conf cocoon.xconf raw.xmap resources.xmap
sitemap.xmap
src/resources/forrest-shbat forrest.build.xml
src/resources/fresh-site forrest.properties
Log:
<action dev="NKB" type="add" context="core">
Now images are generated from the xdocs content dir as if they
were in the resources/images dir. The latter will be phased out.
</action>
<action dev="NKB" type="fix" context="core">
Fixed tha handling of images and resources in the resources.xmap
pipeline, to cater for the new system that does not copy docs prior
to rendering.
</action>
<action dev="NKB" type="add" context="shbat">
Added a new property to forrest.properties
(project.raw-content-dir=${project.content-dir}/content)
to define where raw files are to be served from.
Also removed the internal property real-content.dir that was
used internally for this and replaced it with a raw-content.dir
property.
</action>
Revision Changes Path
1.25 +2 -2 xml-forrest/src/resources/conf/cocoon.xconf
Index: cocoon.xconf
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/conf/cocoon.xconf,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- cocoon.xconf 12 Oct 2003 12:51:32 -0000 1.24
+++ cocoon.xconf 16 Oct 2003 15:16:09 -0000 1.25
@@ -170,8 +170,8 @@
<component-instance name="project" class="org.apache.cocoon.components.modules.input.DefaultsMetaModule">
<values>
<skin>@skin@</skin>
- <doc>@project.content-dir@</doc>
- <content>@project.real-content-dir@/</content>
+ <doc>@project.home@/@project.content-dir@/</doc>
+ <content>@project.home@/@project.raw-content-dir@/</content>
<content.xdocs>@project.home@/@project.xdocs-dir@/</content.xdocs>
<resources.stylesheets>@project.home@/@project.stylesheets-dir@/</resources.stylesheets>
<resources.images>@project.home@/@project.images-dir@/</resources.images>
1.11 +17 -17 xml-forrest/src/resources/conf/raw.xmap
Index: raw.xmap
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/conf/raw.xmap,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- raw.xmap 7 Aug 2003 14:09:00 -0000 1.10
+++ raw.xmap 16 Oct 2003 15:16:09 -0000 1.11
@@ -3,13 +3,13 @@
Serves 'raw' content from files in src/documentation/content/
This allows the inclusion of binary content (*.doc, *.pdf etc) in Forrest sites.
-This pipeline *relies* on the caller checking if the content actually exists!
+This pipeline *relies* on the caller checking if the {project:content}/ actually exists!
If the caller doesn't do this, this sitemap's '**' pipeline will match everything.
-Generates : Exact bytes read from content/**
+Generates : Exact bytes read from {project:content}//**
Example URL: http://localhost:8888/blah.doc
Used by : sitemap.xmap
-Uses : content/**
+Uses : {project:content}//**
$Revision$
==================================================== -->
@@ -36,55 +36,55 @@
<map:match pattern="**.html">
<!--
Use this instead if you want JTidy to clean up your HTML
- <map:generate type="html" src="content/{0}" />
+ <map:generate type="html" src="{project:content}//{0}" />
<map:serialize type="html"/>
-->
- <map:read src="content/{0}" mime-type="text/html"/>
+ <map:read src="{project:content}//{0}" mime-type="text/html"/>
</map:match>
<map:match pattern="**.xml">
- <map:generate type="file" src="content/{0}" />
+ <map:generate type="file" src="{project:content}//{0}" />
<map:serialize type="xml" />
</map:match>
<map:match pattern="skin/**.css">
- <map:read src="content/{1}.css" mime-type="text/css" />
+ <map:read src="{project:content}//{1}.css" mime-type="text/css" />
</map:match>
<map:match pattern="**.js">
- <map:read src="content/{0}" mime-type="application/javascript" />
+ <map:read src="{project:content}//{0}" mime-type="application/javascript" />
</map:match>
<map:match pattern="**.gif">
- <map:read src="content/{0}" mime-type="image/gif" />
+ <map:read src="{project:content}//{0}" mime-type="image/gif" />
</map:match>
<map:match pattern="**.png">
- <map:read src="content/{0}" mime-type="image/png" />
+ <map:read src="{project:content}//{0}" mime-type="image/png" />
</map:match>
<map:match pattern="**.jpg">
- <map:read src="content/{0}" mime-type="image/jpeg" />
+ <map:read src="{project:content}//{0}" mime-type="image/jpeg" />
</map:match>
<map:match pattern="**.jpeg">
- <map:read src="content/{0}" mime-type="image/jpeg" />
+ <map:read src="{project:content}//{0}" mime-type="image/jpeg" />
</map:match>
<map:match pattern="**.pdf">
- <map:read src="content/{0}" mime-type="application/pdf" />
+ <map:read src="{project:content}//{0}" mime-type="application/pdf" />
</map:match>
<map:match pattern="**.swf">
- <map:read src="content/{0}" mime-type="application/x-shockwave-flash" />
+ <map:read src="{project:content}//{0}" mime-type="application/x-shockwave-flash" />
</map:match>
<map:match pattern="**.txt">
- <map:read src="content/{0}" mime-type="text/plain" />
+ <map:read src="{project:content}//{0}" mime-type="text/plain" />
</map:match>
<map:match pattern="**">
- <map:read src="content/{1}"/>
+ <map:read src="{project:content}//{1}"/>
</map:match>
</map:match>
1.6 +29 -7 xml-forrest/src/resources/conf/resources.xmap
Index: resources.xmap
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/conf/resources.xmap,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- resources.xmap 12 Oct 2003 12:51:32 -0000 1.5
+++ resources.xmap 16 Oct 2003 15:16:09 -0000 1.6
@@ -84,25 +84,47 @@
<map:read src="{project:content.xdocs}{1}my-images/{2}.{3}" mime-type="image/{3}" />
</map:match>
- <map:match pattern="images/**.png">
+ <map:match pattern="**.png">
<map:select type="exists">
+ <map:when test="{project:content.xdocs}/{1}.svg">
+ <map:generate src="{project:content.xdocs}/{1}.svg" />
+ <map:transform src="resources/stylesheets/project2text.xsl" />
+ <map:serialize type="svg2png" />
+ </map:when>
<map:when test="resources/images/{1}.svg">
- <map:generate src="resources/images/{1}.svg" />
- <map:transform src="resources/stylesheets/project2text.xsl" />
+ <map:generate src="{project:resources.images}/{1}.svg" />
+ <map:transform src="resources/stylesheets/project2text.xsl" />
<map:serialize type="svg2png" />
</map:when>
+ <map:when test="{project:content.xdocs}/{1}.png">
+ <map:read src="{project:content.xdocs}/{1}.png" mime-type="image/png" />
+ </map:when>
<map:otherwise>
- <map:read src="resources/images/{1}.png" mime-type="image/png" />
+ <map:read src="{project:resources.images}/{1}.png" mime-type="image/png" />
</map:otherwise>
</map:select>
</map:match>
<map:match pattern="images/**.*">
- <map:read src="resources/images/{1}.{2}" mime-type="image/{2}" />
+ <map:select type="exists">
+ <map:when test="{project:content.xdocs}/images/{1}.{2}">
+ <map:read src="{project:content.xdocs}/images/{1}.{2}" mime-type="image/{2}" />
+ </map:when>
+ <map:otherwise>
+ <map:read src="{project:resources.images}/{1}.{2}" mime-type="image/{2}" />
+ </map:otherwise>
+ </map:select>
</map:match>
<map:match pattern="**/images/**.*">
- <map:read src="resources/images/{2}.{3}" mime-type="image/{3}" />
+ <map:select type="exists">
+ <map:when test="{project:content.xdocs}/{1}/images/{2}.{3}">
+ <map:read src="{project:content.xdocs}/{1}/images/{2}.{3}" mime-type="image/{3}" />
+ </map:when>
+ <map:otherwise>
+ <map:read src="{project:resources.images}/{2}.{3}" mime-type="image/{3}" />
+ </map:otherwise>
+ </map:select>
</map:match>
<map:match pattern="**favicon.ico">
1.124 +2 -2 xml-forrest/src/resources/conf/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- sitemap.xmap 12 Oct 2003 12:51:32 -0000 1.123
+++ sitemap.xmap 16 Oct 2003 15:16:09 -0000 1.124
@@ -291,7 +291,7 @@
<map:match type="regexp" pattern="^.+$">
<map:select type="exists">
- <map:when test="content/{0}">
+ <map:when test="{project:content}/{0}">
<map:mount uri-prefix="" src="raw.xmap" check-reload="yes" />
</map:when>
</map:select>
1.112 +6 -8 xml-forrest/src/resources/forrest-shbat/forrest.build.xml
Index: forrest.build.xml
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/forrest-shbat/forrest.build.xml,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- forrest.build.xml 12 Oct 2003 12:51:32 -0000 1.111
+++ forrest.build.xml 16 Oct 2003 15:16:09 -0000 1.112
@@ -89,9 +89,7 @@
<!-- FIXME: rename project.content-dir to project.documentation-dir -->
<property name="content-dir" location="${project.home}/${project.content-dir}" />
- <!-- NOTE: Do not rely on this 'project.real-content-dir' property, as it
- will go away soon -->
- <property name="real-content-dir" location="${project.home}/${project.content-dir}/content" />
+ <property name="raw-content-dir" location="${project.home}/${project.content-dir}/content" />
<property name="sitemap-dir" location="${project.home}/${project.sitemap-dir}" />
<property name="xdocs-dir" location="${project.home}/${project.xdocs-dir}" />
<property name="resources-dir" location="${project.home}/${project.resources-dir}"/>
@@ -128,7 +126,7 @@
<target name="examine-proj" depends="init-props">
<available property="conf.present" file="${conf-dir}" type="dir"/>
- <available property="real-content.present" file="${real-content-dir}" type="dir"/>
+ <available property="raw-content.present" file="${raw-content-dir}" type="dir"/>
<available property="sitemap.present" file="${sitemap-dir}" type="dir"/>
<available property="xdocs.present" file="${xdocs-dir}" type="dir"/>
<available property="resources.present" file="${resources-dir}" type="dir"/>
@@ -484,11 +482,11 @@
</target>
<!-- Copy all non-xdocs content -->
- <target name="copy-content" if="real-content.present">
+ <target name="copy-content" if="raw-content.present">
<copy toDir="${project.ctxt-dir}/content"
overwrite="false" failonerror="false">
- <fileset dir="${real-content-dir}">
- <exclude name="xdocs/**"/>
+ <fileset dir="${raw-content-dir}">
+ <exclude name="${xdocs-dir}/**"/>
</fileset>
</copy>
</target>
1.33 +1 -0 xml-forrest/src/resources/fresh-site/forrest.properties
Index: forrest.properties
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/fresh-site/forrest.properties,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- forrest.properties 10 Sep 2003 09:37:10 -0000 1.32
+++ forrest.properties 16 Oct 2003 15:16:09 -0000 1.33
@@ -32,6 +32,7 @@
#project.content-dir=src/documentation
#project.conf-dir=${project.content-dir}/conf
#project.sitemap-dir=${project.content-dir}
+#project.raw-content-dir=${project.content-dir}/content
#project.xdocs-dir=${project.content-dir}/content/xdocs
#project.resources-dir=${project.content-dir}/resources
#project.stylesheets-dir=${project.resources-dir}/stylesheets