forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schlierf, Stephan" <Stephan.Schli...@VSA.de>
Subject AW: tab specific PDF
Date Mon, 12 Jul 2004 06:54:23 GMT
I don't know whether it fits your request but the following allows you to
generate pdf-files depending on the structure of your site.xml:
1.) Change to the [project]/src/documentation directory
2.) Copy aggregate.xmap to - say - foo.xmap
3.) Edit sitemap.xmap and insert the following lines after the <map:match
pattern="site.xml"> pipeline (around line 194):
    ...
    <map:match pattern="foo.xml">
       <map:mount uri-prefix="" src="foo.xmap" check-reload="yes" />
    </map:match>
    ...
4.) Edit foo.xmap; the <map:match pattern="*.xml"> element should look like
the following:
        <map:match pattern="*.xml">
            <map:generate src="cocoon://abs-linkmap"/>
            <map:transform type="xpath">
                <map:parameter name="include"
value="/*[name()='site']/*[name()='MyFooSite']"/>
            </map:transform>
            <map:transform src="resources/stylesheets/site2book.xsl" />
            <map:transform
src="resources/stylesheets/aggregates/book2cinclude.xsl">
              <map:parameter name="title" value="{conf:project-name}: Still
My Foo Site"/>
            </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>
5.) What happens there? Line 4 (<map:parameter ...>) looks at your site.xml
and finds something like:
    ...
    <MyFooSite label="Your foo site">
	<firstchapter label="Introduction" href="first.html"/>
	<sec_chapter label="Conclusion" href="second.html/>
    </MyFooSite>
    ...
    So it takes all the elements of <MyFooSite> - that means <MyFootSite>
and its "children" - for the content of the pdf-file to generate.
6.) In site.xml, add something like
	<all>
	  <whole_foosite href="FooSite.pdf"/>
	</all>
	This allows you to link to it via a <link href="site:whole_foosite">
reference. If you need it in the menue entries add the label attribute to
the <whole_foosite> element: <whole_foosite label="My first PDF-file"
href="FooSite.pdf"/>

HTH,
Stephan

BTW: Does anybody know something about a planned wiki for forrest ? I think
it would be great to have something like this because it would help to
increase the docs ...

> -----Urspr√ľngliche Nachricht-----
> Von: Dave Brondsema [mailto:dave@brondsema.net]
> Gesendet: Samstag, 10. Juli 2004 14:22
> An: user@forrest.apache.org
> Betreff: Re: tab specific PDF
> 
> 
> It's not terribly hard.  At least a hardcoded hack 
> (specifying exactly 
> what site.xml nodes to include) would be easier than setting 
> it up for 
> each tabs.  But if you could do it so it works for all projects, we'd 
> gladly welcome a patch :-)
> 
> Take a look at:
> src/core/context/sitemap.xml (it mounts and uses 
> aggregate.xml for any 
> request to "site.xml")
> src/core/context/aggregate.xml
> src/core/context/resources/stylesheets/aggregate/*
> 
> Robert McIntosh wrote:
> > well, darn. I liked some of the suggestions mentioned in 
> the thread. Is 
> > anyone working on this?
> > I also saw mention of modifying the sitemap to possibly do 
> some of this. 
> > How difficult would that be? (its been a LONG time since 
> I've messes with 
> > Cocoon)
> > 
> > Robert
> > 
> > 
> > 
> > 
> > 
> > Dave Brondsema <dave@brondsema.net> 
> > 07/09/2004 11:34 AM
> > Please respond to
> > user@forrest.apache.org
> > 
> > 
> > To
> > user@forrest.apache.org
> > cc
> > 
> > Subject
> > Re: tab specific PDF
> > 
> > 
> > 
> > 
> > 
> > 
> > Robert McIntosh wrote:
> > 
> >>I managed to get a whole site PDF working using the <all_sitePDF 
> >>label="Full PDF" href="site.pdf"/> syntax in the <about> 
> tag, but is 
> > 
> > there 
> > 
> >>a way to get a complete tab PDF, which is what I really 
> need? My site 
> > 
> > has 
> > 
> >>4 tabs and one of them is a manual and it is that one that 
> I would like 
> > 
> > to 
> > 
> >>get a full PDF of without the rest of the site being included. 
> >>
> >>I'm using version .6 and the Krysalis skin if that matters.
> >>
> >>Thanks,
> >>Robert 
> >>
> > 
> > 
> > There is not.  There was a recent discussion of this topic 
> on the dev 
> > list that you can read here:
> > 
> > http://marc.theaimsgroup.com/?t=108878195900002&r=1&w=2
> > 
> 
> 
> -- 
> Dave Brondsema : dave@brondsema.net
> http://www.splike.com : programming
> http://csx.calvin.edu : student org
> http://www.brondsema.net : personal
> 

Mime
View raw message