forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: Building sections as PDF
Date Thu, 02 Oct 2003 10:16:28 GMT
On Wed, Oct 01, 2003 at 04:57:58PM -1000, Don Brown wrote:
> In the FAQ, there is a question about building the whole site or selected
> pages as PDF.  While the answer covers building the whole site as PDF, as
> far as I can tell, it is not possible, without touching sitemaps, to
> generate sections or tabs as PDF.
> Jeff seems to hint at possible solutions in the future,
>, but I
> didn't see anything after that.

The mechanics are all in place.  It just requires a bit of sitemap

If you look in aggregate.xmap, you'll see how the whole-site PDF works:

 <!-- Aggregation of all XML in the site -->
 <map:match pattern="*.xml">
   <map:generate src="cocoon://abs-linkmap"/>
   <map:transform src="resources/stylesheets/site2book.xsl" />
   <map:transform src="resources/stylesheets/aggregates/book2cinclude.xsl">
     <map:parameter name="ignore" value="{1}"/>
     <map:parameter name="title" value="{conf:project-name} Documentation"/>
   <map:transform type="cinclude"/>
   <map:transform src="resources/stylesheets/aggregates/doc2doc-uniqueids.xsl"/>
   <map:transform src="resources/stylesheets/aggregates/docs2document.xsl"/>
   <map:serialize type="xml"/>

If you view cocoon://abs-linkmap ('forrest run', then
http://localhost:8888/abs-linkmap), you'll see it is a normalized view of
site.xml, listing each page in the site.  You could trim that XML down to just
the required section with:

 <map:transform type="xpath">
   <map:parameter name="include" value="//some/section/*" />

(that being an XPath matching nodes to let through; see
for details)

The pipeline with this modification could then be saved in sitemap.xmap,
matching the pattern 'usermanual.xml' or whatever.

Does that give you enough to go on?  I could whip up a sample if you



> Am I missing something?
> Don

View raw message