You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by br...@apache.org on 2004/07/13 01:50:12 UTC
svn commit: rev 22857 - forrest/trunk/src/core/context
Author: brondsem
Date: Mon Jul 12 16:50:11 2004
New Revision: 22857
Modified:
forrest/trunk/src/core/context/faq.xmap
forrest/trunk/src/core/context/sitemap.xmap
Log:
fix PDFs for FAQ files by updating matchers to be like those of sitemap.xmap
Modified: forrest/trunk/src/core/context/faq.xmap
==============================================================================
--- forrest/trunk/src/core/context/faq.xmap (original)
+++ forrest/trunk/src/core/context/faq.xmap Mon Jul 12 16:50:11 2004
@@ -112,8 +112,27 @@
</map:resources>
- <map:pipelines>
+ <map:pipelines>
+ <map:pipeline internal-only="false">
+ <map:match pattern="skinconf.xml">
+ <map:generate src="{project:skinconf}" />
+ <map:transform src="{forrest:stylesheets}/upgrade-skinconf.xsl"/>
+ <map:select type="exists">
+ <map:when test="{project:skins-dir}{forrest:skin}/skinconf.xsl">
+ <map:transform src="{project:skins-dir}{forrest:skin}/skinconf.xsl"/>
+ </map:when>
+ </map:select>
+ <map:select type="exists">
+ <map:when test="{forrest:context}/skins/{forrest:skin}/skinconf.xsl">
+ <map:transform src="{forrest:context}/skins/{forrest:skin}/skinconf.xsl"/>
+ </map:when>
+ </map:select>
+ <map:transform src="{forrest:context}/skins/common/skinconf.xsl"/>
+ <map:transform type="skinconf"/>
+ <map:serialize type="xml" />
+ </map:match>
+ </map:pipeline>
<map:pipeline>
<!-- ============================================================ -->
@@ -123,17 +142,30 @@
<!-- Special matcher for FAQ PDFs, so we can pass an extra
'numbersections' param into document2fo.xsl -->
<map:match pattern="**.pdf">
- <map:generate src="cocoon:/{1}.xml"/>
+ <map:aggregate element="site">
+ <map:part src="cocoon:/skinconf.xml"/>
+ <map:part src="cocoon:/{1}.xml"/>
+ </map:aggregate>
+ <map:transform type="xinclude"/>
+ <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.pdf"/>
+ <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
<map:select type="exists">
- <map:when test="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
+ <map:when test="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
<map:transform src="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
+ <map:parameter name="numbersections" value="false"/>
+ <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+ <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+ </map:transform>
+ </map:when>
+ <map:when test="{forrest:context}/skins/{forrest:skin}/xslt/fo/document2fo.xsl">
+ <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/fo/document2fo.xsl">
<map:parameter name="numbersections" value="false"/>
<map:parameter name="imagesdir" value="{project:resources.images}/"/>
<map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
</map:transform>
</map:when>
<map:otherwise>
- <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/fo/document2fo.xsl">
+ <map:transform src="{forrest:context}/skins/common/xslt/fo/document2fo.xsl">
<map:parameter name="numbersections" value="false"/>
<map:parameter name="imagesdir" value="{project:resources.images}/"/>
<map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
@@ -142,6 +174,40 @@
</map:select>
<map:serialize type="fo2pdf"/>
</map:match>
+
+ <map:match pattern="**.fo">
+ <map:aggregate element="site">
+ <map:part src="cocoon:/skinconf.xml"/>
+ <map:part src="cocoon:/{1}.xml"/>
+ </map:aggregate>
+ <map:transform type="xinclude"/>
+ <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.pdf"/>
+ <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
+ <map:select type="exists">
+ <map:when test="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
+ <map:transform src="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
+ <map:parameter name="numbersections" value="false"/>
+ <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+ <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+ </map:transform>
+ </map:when>
+ <map:when test="{forrest:context}/skins/{forrest:skin}/xslt/fo/document2fo.xsl">
+ <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/fo/document2fo.xsl">
+ <map:parameter name="numbersections" value="false"/>
+ <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+ <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+ </map:transform>
+ </map:when>
+ <map:otherwise>
+ <map:transform src="{forrest:context}/skins/common/xslt/fo/document2fo.xsl">
+ <map:parameter name="numbersections" value="false"/>
+ <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+ <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="xml"/>
+ </map:match>
<!-- ============================================================ -->
<!-- INTERMEDIATE FORMATS -->
@@ -171,7 +237,7 @@
<map:call resource="transform-to-document">
<map:parameter name="src" value="{project:content.xdocs}{0}" />
</map:call>
- <map:serialize type="xml-document"/>
+ <map:serialize type="xml"/>
</map:match>
</map:pipeline>
Modified: forrest/trunk/src/core/context/sitemap.xmap
==============================================================================
--- forrest/trunk/src/core/context/sitemap.xmap (original)
+++ forrest/trunk/src/core/context/sitemap.xmap Mon Jul 12 16:50:11 2004
@@ -431,6 +431,9 @@
<map:match pattern="**faq.pdf">
<map:mount uri-prefix="" src="faq.xmap" check-reload="yes" />
</map:match>
+ <map:match pattern="**faq.fo">
+ <map:mount uri-prefix="" src="faq.xmap" check-reload="yes" />
+ </map:match>
<map:match type="regexp" pattern="^(.*?)([^/]*).pdf$">
<map:aggregate element="site">