forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Brown <mr...@twdata.org>
Subject Re: Building sections as PDF
Date Thu, 02 Oct 2003 19:13:09 GMT
Thanks for the tip, but you might want to change your faq as it implies
there is a built-in way to put selected pages in a PDF.

Don

On Thu, 2 Oct 2003, Jeff Turner wrote:

> 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,
> > http://marc.theaimsgroup.com/?l=forrest-dev&m=105516618908652&w=2, but I
> > didn't see anything after that.
>
> The mechanics are all in place.  It just requires a bit of sitemap
> hacking.
>
> 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>
>    <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"/>
>  </map:match>
>
> 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/*" />
>  </map:transform>
>
> (that being an XPath matching nodes to let through; see XPathTransformer.java
> 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
> like.
>
>
> Cheers,
>
> --Jeff
>
>
> >
> > Am I missing something?
> >
> > Don
> >
>


Mime
View raw message