forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert McIntosh <robert.mcint...@zurichna.com>
Subject Re: AW: tab specific PDF
Date Tue, 13 Jul 2004 18:06:20 GMT
Ok, I think this should do what I want, but maybe I'm confused. Here is 
what I did based on what you sent me:

1. create a 'my_aggregate.xmap' file which is a copy of aggregate.xmap
2. add:
<map:transform type="xpath">
    <map:parameter name="include" 
value="/*[name()='site']/*[name()='PersistenceManual']"/>
</map:transform>

right after the ma:generate entry.

3. went to sitemap.xmap and added the entry:
        <map:match pattern="my_aggregate.xml">
          <map:mount uri-prefix="" src="my_aggregate.xmap" 
check-reload="yes" />
        </map:match>

right after the 
        <map:match pattern="site.xml">
          <map:mount uri-prefix="" src="aggregate.xmap" check-reload="yes" 
/>
        </map:match>
entry. Was I supposed to replace this entry with the new one??

4. My site.xml has a tab/entry called PersistenceManual to which I added 
the tag:
   <all_sitePDF label="Full PDF" href="PersistenceManual.pdf" />

I am assuming that the parent tag of this entry, being <PersistenceManual> 
in my case is what is caught in the my_aggregate.xmap transform above. I 
notice the xpath in that looks for a name of 'site'. Is this the URL for 
site.pdf as in the case of a full site PDF? 

Thanks,
Robert




"Schlierf, Stephan" <Stephan.Schlierf@VSA.de> 
07/12/2004 01:54 AM
Please respond to
user@forrest.apache.org


To
"'user@forrest.apache.org'" <user@forrest.apache.org>
cc

Subject
AW: tab specific PDF






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
> 

 


******************* PLEASE NOTE *******************
This message, along with any attachments, may be confidential or legally 
privileged.  It is intended only for the named person(s), who is/are the 
only authorized recipients. If this message has reached you in error, 
please notify the sender immediately and promptly destroy it without 
review. Dissemination, distribution or copying of this communication is 
strictly prohibited. Thank you for your help.
**********************************************************

Mime
View raw message