You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Garrett Steed <gm...@simulexinc.com> on 2003/05/05 15:33:12 UTC

libre- where to start?

Newbe question.
 
Good morning: I read the doc's last week and I think I might be missing
something. How do I start?  Do I have to turn on some feature in my
sitemap.xmap?  Can I just put an libre.xml file in a directory if so
which one?  I understand the concept on how to write the file but I
don't know where to put the file or what comments I must make to
activate it.  Any help would be great.  
 
Thanks so much.
-Garrett

Re: libre- where to start?/Thanks

Posted by yachting heritage <co...@yachting-heritage.com>.
remove me from your list
----- Original Message ----- 
From: "Juan Jose Pablos" <ch...@che-che.com>
To: <fo...@xml.apache.org>
Sent: Monday, June 16, 2003 12:12 PM
Subject: Re: libre- where to start?/Thanks


> Jeff,
>
> >
> > It would work in the main sitemap, but if it is a 'book' matcher
> > (follows the pattern '**book-*'), then it ought to go in navigation.xmap
> > (.xmap extension, not .xml) with the other book matchers.
>
> It seems to be a typo here:
>
>
> Index: resources/stylesheets/directory2book.xsl
> ===================================================================
> RCS file:
> /home/cvspublic/xml-forrest/src/resources/stylesheets/directory2book.xsl,v
> retrieving revision 1.1
> diff -u -r1.1 directory2book.xsl
> --- resources/stylesheets/directory2book.xsl 11 Jun 2003 10:47:20 -0000
1.1
> +++ resources/stylesheets/directory2book.xsl 16 Jun 2003 11:01:56 -0000
> @@ -2,7 +2,7 @@
>
>   <!-- Converts the output of the DirectoryGenerator to Forrest's book.xml
>   format.  Typically this would be used to define a book.xml pipeline for
a
> -specific page.  Eg, in navigation.xml, define the DirectoryGenerator:
> +specific page.  Eg, in navigation.xmap, define the DirectoryGenerator:
>
>   <map:generators default="file">
>     <map:generator name="directory"
> src="org.apache.cocoon.generation.DirectoryGenerator" />
>
>
> I test it and it works!. But I have got an issue: If I create a new file
>   it will not be displayed until I stop the jetty webserver and start it
> again.
>
> I test a request with book-index.html and I am able to see the new menu
> item, but when I request menu-index.html, I can not see the expected
> results.
>
>
> did you know that this actually happen?
>
>
> Cheers
>
> Cheche
>
>
>
>



Re: libre- where to start?/Thanks

Posted by Juan Jose Pablos <ch...@che-che.com>.
I found a work around:

on sitemap.xmap:

     <map:pipes default="noncaching">
       <map:pipe name="caching" 
src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
       <map:pipe name="noncaching" 
src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
       <map:pipe name="profile-caching" 
src="org.apache.cocoon.components.profiler.ProfilingCachingProcessingPipeline"/>
       <map:pipe name="profile-noncaching" 
src="org.apache.cocoon.components.profiler.ProfilingNonCachingProcessingPipeline"/>
     </map:pipes>


Re: libre- where to start?/Thanks

Posted by Juan Jose Pablos <ch...@che-che.com>.
Jeff,

>>I test a request with book-index.html and I am able to see the new menu 
>>item, but when I request menu-index.html, I can not see the expected 
>>results.
> 
> 
> Weird.  Are you sure it's not browser caching?  menu-*.html doesn't do much:

I am sure it is not..

> If you add a <map:serialize type="xml"/> at various places in there, that would
> isolate which component is misbehaving.

I tried and I put the serialize after the generator, and that fail:

       <map:match pattern="**menu-*.html">
         <map:generate src="cocoon:/{1}book-{2}.html"/>
           <map:serialize type="xml" />



The navigation.xmap is mounted (map:mount),  is this important?


Cheers

Cheche




Re: libre- where to start?/Thanks

Posted by yachting heritage <co...@yachting-heritage.com>.
remove me from your list
----- Original Message ----- 
From: "Jeff Turner" <je...@apache.org>
To: <fo...@xml.apache.org>
Sent: Monday, June 16, 2003 12:30 PM
Subject: Re: libre- where to start?/Thanks


> On Mon, Jun 16, 2003 at 01:12:13PM +0200, Juan Jose Pablos wrote:
> > Jeff,
> >
> > >
> > >It would work in the main sitemap, but if it is a 'book' matcher
> > >(follows the pattern '**book-*'), then it ought to go in
navigation.xmap
> > >(.xmap extension, not .xml) with the other book matchers.
> >
> > It seems to be a typo here:
> ...
> > -specific page.  Eg, in navigation.xml, define the DirectoryGenerator:
> > +specific page.  Eg, in navigation.xmap, define the DirectoryGenerator:
>
> Ah yes, fixed thanks.
>
> > I test it and it works!. But I have got an issue: If I create a new file
> >  it will not be displayed until I stop the jetty webserver and start it
> > again.
> >
> > I test a request with book-index.html and I am able to see the new menu
> > item, but when I request menu-index.html, I can not see the expected
> > results.
>
> Weird.  Are you sure it's not browser caching?  menu-*.html doesn't do
much:
>
>       <map:match pattern="**menu-*.html">
>         <map:generate src="cocoon:/{1}book-{2}.html"/>
>         <map:transform type="linkrewriter"
src="cocoon:/{1}linkmap-{2}.html">
>           <map:parameter name="schemes" value="site ext"/>
>         </map:transform>
>         <map:call resource="skinit">
>           <map:parameter name="type" value="book2menu"/>
>           <map:parameter name="path" value="/{1}{2}.xml"/>
>         </map:call>
>       </map:match>
>
> If you add a <map:serialize type="xml"/> at various places in there, that
would
> isolate which component is misbehaving.
>
> --Jeff
>
> >
> > Cheers
> >
> > Cheche
> >
>
>



Re: libre- where to start?/Thanks

Posted by Jeff Turner <je...@apache.org>.
On Mon, Jun 16, 2003 at 01:12:13PM +0200, Juan Jose Pablos wrote:
> Jeff,
> 
> >
> >It would work in the main sitemap, but if it is a 'book' matcher 
> >(follows the pattern '**book-*'), then it ought to go in navigation.xmap 
> >(.xmap extension, not .xml) with the other book matchers.
> 
> It seems to be a typo here:
...
> -specific page.  Eg, in navigation.xml, define the DirectoryGenerator:
> +specific page.  Eg, in navigation.xmap, define the DirectoryGenerator:

Ah yes, fixed thanks.

> I test it and it works!. But I have got an issue: If I create a new file 
>  it will not be displayed until I stop the jetty webserver and start it 
> again.
> 
> I test a request with book-index.html and I am able to see the new menu 
> item, but when I request menu-index.html, I can not see the expected 
> results.

Weird.  Are you sure it's not browser caching?  menu-*.html doesn't do much:

      <map:match pattern="**menu-*.html">
        <map:generate src="cocoon:/{1}book-{2}.html"/>
        <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html">
          <map:parameter name="schemes" value="site ext"/>
        </map:transform>
        <map:call resource="skinit">
          <map:parameter name="type" value="book2menu"/>
          <map:parameter name="path" value="/{1}{2}.xml"/>
        </map:call>
      </map:match>

If you add a <map:serialize type="xml"/> at various places in there, that would
isolate which component is misbehaving.

--Jeff

> 
> Cheers
> 
> Cheche
> 

Re: libre- where to start?/Thanks

Posted by Juan Jose Pablos <ch...@che-che.com>.
Jeff,

> 
> It would work in the main sitemap, but if it is a 'book' matcher 
> (follows the pattern '**book-*'), then it ought to go in navigation.xmap 
> (.xmap extension, not .xml) with the other book matchers.

It seems to be a typo here:


Index: resources/stylesheets/directory2book.xsl
===================================================================
RCS file: 
/home/cvspublic/xml-forrest/src/resources/stylesheets/directory2book.xsl,v
retrieving revision 1.1
diff -u -r1.1 directory2book.xsl
--- resources/stylesheets/directory2book.xsl	11 Jun 2003 10:47:20 -0000	1.1
+++ resources/stylesheets/directory2book.xsl	16 Jun 2003 11:01:56 -0000
@@ -2,7 +2,7 @@

  <!-- Converts the output of the DirectoryGenerator to Forrest's book.xml
  format.  Typically this would be used to define a book.xml pipeline for a
-specific page.  Eg, in navigation.xml, define the DirectoryGenerator:
+specific page.  Eg, in navigation.xmap, define the DirectoryGenerator:

  <map:generators default="file">
    <map:generator name="directory" 
src="org.apache.cocoon.generation.DirectoryGenerator" />


I test it and it works!. But I have got an issue: If I create a new file 
  it will not be displayed until I stop the jetty webserver and start it 
again.

I test a request with book-index.html and I am able to see the new menu 
item, but when I request menu-index.html, I can not see the expected 
results.


did you know that this actually happen?


Cheers

Cheche




RE: libre- where to start?/Thanks

Posted by Garrett Steed <gm...@simulexinc.com>.
Ok thanks.

I will give it a try tomorrow morning.

Garrett

-----Original Message-----
From: news [mailto:news@main.gmane.org] On Behalf Of Jeff Turner
Sent: Wednesday, June 11, 2003 5:34 PM
To: forrest-dev@xml.apache.org
Subject: Re: libre- where to start?/Thanks


Garrett Steed wrote:
> Thank you very much!
> 
> I ended up writing my own yesterday but, it was great to see your much

> more professional version. :)  This will help with a few tweaks I 
> needed to make.  Not to mention that I was not exactly sure where to 
> place the code and if I was doing it correctly.
> 
> I noticed that you recommended placing the code in 'navigation.xml'. 
> Would it be incorrect to place your code in the sitemap.xmap?  I had 
> done that, it worked, but I would like to have my forrest project as 
> close to the "correct" version as possible for ease of training and 
> explaining.  Should I have placed it in the 
> src/documentation/navigation.xml file?

It would work in the main sitemap, but if it is a 'book' matcher 
(follows the pattern '**book-*'), then it ought to go in navigation.xmap

(.xmap extension, not .xml) with the other book matchers.

--Jeff


> Once again thanks for all your help
> Regards
> Garrett
> 
> 
> 
> 
> -----Original Message-----
> From: Jeff Turner [mailto:jefft@apache.org]
> Sent: Wednesday, June 11, 2003 5:52 AM
> To: forrest-dev@xml.apache.org
> Subject: Re: libre- where to start?
> 
> 
> On Tue, Jun 10, 2003 at 01:31:12PM -0500, Garrett Steed wrote:
> 
>>Jeff Turner and forrest-dev list-
>>Thank you so much for your help.
>>
>>I know this group moves really fast and this was a post from a long
>>time ago, but if you wouldn't mind continuing with this.  I have 
>>Forrest set up on my computer and everything is working correctly I 
>>would like to test to make sure that the pattern match is working 
>>correctly would you be willing to send the source for 
>>directory2book.xsl.  I want to make my own but it would be nice to 
>>know if my system was working correctly.
> 
> 
> I have added it to Forrest, since it seems frequently useful.  It is 
> in src/resources/stylesheets/directory2book.xsl
> 
> http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources
> /s
> tylesheets/directory2book.xsl?rev=1.1&content-type=text/plain
> 
> --Jeff
> 
> 
>>Thank you very much.
>>
>>Garrett
> 
> 
> 



Re: libre- where to start?/Thanks

Posted by Jeff Turner <je...@apache.org>.
Garrett Steed wrote:
> Thank you very much!  
> 
> I ended up writing my own yesterday but, it was great to see your much
> more professional version. :)  This will help with a few tweaks I needed
> to make.  Not to mention that I was not exactly sure where to place the
> code and if I was doing it correctly.  
> 
> I noticed that you recommended placing the code in 'navigation.xml'.
> Would it be incorrect to place your code in the sitemap.xmap?  I had
> done that, it worked, but I would like to have my forrest project as
> close to the "correct" version as possible for ease of training and
> explaining.  Should I have placed it in the
> src/documentation/navigation.xml file?

It would work in the main sitemap, but if it is a 'book' matcher 
(follows the pattern '**book-*'), then it ought to go in navigation.xmap 
(.xmap extension, not .xml) with the other book matchers.

--Jeff


> Once again thanks for all your help
> Regards
> Garrett
> 
> 
> 
> 
> -----Original Message-----
> From: Jeff Turner [mailto:jefft@apache.org] 
> Sent: Wednesday, June 11, 2003 5:52 AM
> To: forrest-dev@xml.apache.org
> Subject: Re: libre- where to start?
> 
> 
> On Tue, Jun 10, 2003 at 01:31:12PM -0500, Garrett Steed wrote:
> 
>>Jeff Turner and forrest-dev list-
>>Thank you so much for your help.
>>
>>I know this group moves really fast and this was a post from a long 
>>time ago, but if you wouldn't mind continuing with this.  I have 
>>Forrest set up on my computer and everything is working correctly I 
>>would like to test to make sure that the pattern match is working 
>>correctly would you be willing to send the source for 
>>directory2book.xsl.  I want to make my own but it would be nice to 
>>know if my system was working correctly.
> 
> 
> I have added it to Forrest, since it seems frequently useful.  It is in
> src/resources/stylesheets/directory2book.xsl
> 
> http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/s
> tylesheets/directory2book.xsl?rev=1.1&content-type=text/plain
> 
> --Jeff
> 
> 
>>Thank you very much.
>>
>>Garrett
> 
> 
> 



RE: libre- where to start?/Thanks

Posted by Garrett Steed <gm...@simulexinc.com>.
Thank you very much!  

I ended up writing my own yesterday but, it was great to see your much
more professional version. :)  This will help with a few tweaks I needed
to make.  Not to mention that I was not exactly sure where to place the
code and if I was doing it correctly.  

I noticed that you recommended placing the code in 'navigation.xml'.
Would it be incorrect to place your code in the sitemap.xmap?  I had
done that, it worked, but I would like to have my forrest project as
close to the "correct" version as possible for ease of training and
explaining.  Should I have placed it in the
src/documentation/navigation.xml file?  

Once again thanks for all your help
Regards
Garrett




-----Original Message-----
From: Jeff Turner [mailto:jefft@apache.org] 
Sent: Wednesday, June 11, 2003 5:52 AM
To: forrest-dev@xml.apache.org
Subject: Re: libre- where to start?


On Tue, Jun 10, 2003 at 01:31:12PM -0500, Garrett Steed wrote:
> Jeff Turner and forrest-dev list-
> Thank you so much for your help.
> 
> I know this group moves really fast and this was a post from a long 
> time ago, but if you wouldn't mind continuing with this.  I have 
> Forrest set up on my computer and everything is working correctly I 
> would like to test to make sure that the pattern match is working 
> correctly would you be willing to send the source for 
> directory2book.xsl.  I want to make my own but it would be nice to 
> know if my system was working correctly.

I have added it to Forrest, since it seems frequently useful.  It is in
src/resources/stylesheets/directory2book.xsl

http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/s
tylesheets/directory2book.xsl?rev=1.1&content-type=text/plain

--Jeff

> Thank you very much.
> 
> Garrett


Re: libre- where to start?

Posted by Jeff Turner <je...@apache.org>.
On Tue, Jun 10, 2003 at 01:31:12PM -0500, Garrett Steed wrote:
> Jeff Turner and forrest-dev list-
> Thank you so much for your help. 
> 
> I know this group moves really fast and this was a post from a long time
> ago, but if you wouldn't mind continuing with this.  I have Forrest set
> up on my computer and everything is working correctly I would like to
> test to make sure that the pattern match is working correctly would you
> be willing to send the source for directory2book.xsl.  I want to make my
> own but it would be nice to know if my system was working correctly.

I have added it to Forrest, since it seems frequently useful.  It is in
src/resources/stylesheets/directory2book.xsl

http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/stylesheets/directory2book.xsl?rev=1.1&content-type=text/plain

--Jeff

> Thank you very much.
> 
> Garrett

RE: libre- where to start?

Posted by Garrett Steed <gm...@simulexinc.com>.
Jeff Turner and forrest-dev list-
Thank you so much for your help. 

I know this group moves really fast and this was a post from a long time
ago, but if you wouldn't mind continuing with this.  I have Forrest set
up on my computer and everything is working correctly I would like to
test to make sure that the pattern match is working correctly would you
be willing to send the source for directory2book.xsl.  I want to make my
own but it would be nice to know if my system was working correctly.

Thank you very much.

Garrett


-----Original Message-----
From: Jeff Turner [mailto:jefft@apache.org] 
Sent: Tuesday, May 06, 2003 4:51 AM
To: forrest-dev@xml.apache.org
Subject: Re: libre- where to start?


On Mon, May 05, 2003 at 08:33:12AM -0500, Garrett Steed wrote:
> Newbe question.
>  
> Good morning: I read the doc's last week and I think I might be 
> missing something. How do I start?  Do I have to turn on some feature 
> in my sitemap.xmap?  Can I just put an libre.xml file in a directory 
> if so which one?  I understand the concept on how to write the file 
> but I don't know where to put the file or what comments I must make to

> activate it.  Any help would be great.

Unfortunately libre is more or less dead from a user POV.  The code is
lurking in the CVS attic, waiting for someone to tackle the problem of
auto-generated menus again.

In the meanwhile, it's pretty easy to generate a book.xml file from a
directory listing.  There is an example of this at:

http://cvs.apache.org/~jefft/forrest/samples/wikirenderer-site/wiki/

Description of the aggregation at:
http://cvs.apache.org/~jefft/forrest/samples/wikirenderer-site/

That sample project requires CVS Forrest to run though.


--Jeff


> Thanks so much.
> -Garrett


Re: libre- where to start?

Posted by Jeff Turner <je...@apache.org>.
On Mon, May 05, 2003 at 08:33:12AM -0500, Garrett Steed wrote:
> Newbe question.
>  
> Good morning: I read the doc's last week and I think I might be missing
> something. How do I start?  Do I have to turn on some feature in my
> sitemap.xmap?  Can I just put an libre.xml file in a directory if so
> which one?  I understand the concept on how to write the file but I
> don't know where to put the file or what comments I must make to
> activate it.  Any help would be great.  

Unfortunately libre is more or less dead from a user POV.  The code is
lurking in the CVS attic, waiting for someone to tackle the problem of
auto-generated menus again.

In the meanwhile, it's pretty easy to generate a book.xml file from a
directory listing.  There is an example of this at:

http://cvs.apache.org/~jefft/forrest/samples/wikirenderer-site/wiki/

Description of the aggregation at:
http://cvs.apache.org/~jefft/forrest/samples/wikirenderer-site/

That sample project requires CVS Forrest to run though.


--Jeff


> Thanks so much.
> -Garrett

libre examples

Posted by Garrett Steed <gm...@simulexinc.com>.
Does anyone have an example of a libre directory and file that they have
gotten working?  I'm really interesting in this tool for forrest I just
seem to be stuck as to were to go next.
 
Thank you very much.
Garrett