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:31:53 GMT
I figured it out.. In my sitemap.xmap I had the pattern set to 
'my_aggregate.xml' and didn't think about it. Well, it finally donned on 
my that that is the URL pattern that cocoon is looking for, so if I 
manually typed in http://site..../my_aggregate.pdf it worked like a charm. 


Thanks for the help!

- Robert

P.S. It would be helpful if this was documented somewhere :-) I had always 
thought the <all_sitePDF> or <whole_site_pdf> tags were special in 
themselves, which is what the forrest docs make them out to be, but it 
turns out it is the URL pattern and the sitemap and aggregate maps that 
are really key. perhaps some kind of utility, transform or otherwise, 
would be nice that could look for a special tag (not elegant I know) and 
generate a separate aggregate file and add the entry to the sitemap, sort 
of a preprocess utility? Or a command line utility would be nice, similar 
to how the 'feed' command works, which would produce an aggregate file for 
each tab entry.




Robert McIntosh <robert.mcintosh@zurichna.com> 
07/13/2004 01:07 PM
Please respond to
user@forrest.apache.org


To
user@forrest.apache.org
cc

Subject
Re: AW: tab specific PDF






Oh yea, in the my_aggregate.xmap file I commented out the:
   <map:parameter name="ignore" value="{1}"/>
entry as I did not see it in your example below.

- 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.
**********************************************************

 


******************* 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