You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Vladimir R. Bossicard" <vl...@bossicard.com> on 2002/10/27 05:24:15 UTC

Here we go again

I'm now following the "using Forrest" howto and I am rewriting the 
Xindice documentation.

I don't know if I made a mistake, but the files I already wrote 
suddenly disapeared.  I don't know if it is after a
"forrest seed" or one of my numerous mv/rm commands, so I will only 
blame myself.

I started from scratch and have the following problems:

- I copied the Forrest howto directory in my project directory (I know 
that I have problems with the howtos so I wanted to start with something 
that worked).  I modify the tabs.xml with:

         <tab label="How-Tos" dir="howto/"/>

when the mouse goes over the link (in the index.html file), I can see 
"http://localhost:8080/Xindice-documentation/howto/" but when I click on 
the link the browser lands at "http://localhost:8080/howto/index.html" 
and since the "Xindice-documentation" is missing, I have a "not found 
resource".

- When I add "Xindice-documentation" I can successfully see the pages 
but their content is empty.  The first page is ok (index.html) but the 
individual how-tos are empty (the border, menus are ok but not the 
content).  I already had problems with how-tos and taking the one from 
Forrest unfortunately doesn't help.

- When I copied them into "xdocs/community/howto"... it works!

I let work on this one for the moment...

-Vladimir

PS: good job but unfortunately not ready to be used by everyone.  You 
still need a lot of patience...

-- 
Vladimir R. Bossicard
www.bossicard.com



Re: Here we go again

Posted by "Vladimir R. Bossicard" <vl...@bossicard.com>.
> disapeared.  I don't know if it is after a
> "forrest seed" or one of my numerous mv/rm commands, so I will only
> blame myself.


It was after some "mv" and I found my code :-)

So Forrest is not to blame.  Good news isn't it?

-Vladimir

-- 
Vladimir R. Bossicard
www.bossicard.com


Re: Here we go again

Posted by Jeff Turner <je...@apache.org>.
On Sun, Oct 27, 2002 at 06:30:11PM +1100, Jeff Turner wrote:
> On Sat, Oct 26, 2002 at 09:24:15PM -0700, Vladimir R. Bossicard wrote:
...
> > I don't know if I made a mistake, but the files I already wrote
> > suddenly disapeared.  I don't know if it is after a "forrest seed" or
> > one of my numerous mv/rm commands, so I will only blame myself.

Glad to hear you recovered it.

...
> > I started from scratch and have the following problems:
> > 
> > - I copied the Forrest howto directory in my project directory (I know 
> > that I have problems with the howtos so I wanted to start with something 
> > that worked).  I modify the tabs.xml with:
> > 
> >         <tab label="How-Tos" dir="howto/"/>
> > 
> > when the mouse goes over the link (in the index.html file), I can see 
> > "http://localhost:8080/Xindice-documentation/howto/" but when I click on 
> > the link the browser lands at "http://localhost:8080/howto/index.html" 
> > and since the "Xindice-documentation" is missing, I have a "not found 
> > resource".
> 
> The Forrest webapp has the same problem :/  I thought I fixed it long
> ago.. will have a look.


This bug is now fixed.  Both the webapp and static site appear to be
working 100%.


--Jeff

Re: Here we go again

Posted by Jeff Turner <je...@apache.org>.
On Sat, Oct 26, 2002 at 09:24:15PM -0700, Vladimir R. Bossicard wrote:
> I'm now following the "using Forrest" howto and I am rewriting the 
> Xindice documentation.
> 
> I don't know if I made a mistake, but the files I already wrote 
> suddenly disapeared.  I don't know if it is after a
> "forrest seed" or one of my numerous mv/rm commands, so I will only 
> blame myself.

I hope it wasn't Forrest.. the 'seed' target will only generate template
docs if the content directory didn't previously exist.  Eg, trying to
clobber Forrest's docs:

jeff@expresso:~/apache/xml/xml-forrest$ forrest seed

.....
ensure-nocontent:

------------------------------------------------
This project already has content in
/home/jeff/apache/xml/xml-forrest/src/documentation/content/xdocs.
------------------------------------------------
BUILD FAILED
file:/home/jeff/apache/xml/xml-forrest/build/dist/shbat/bin/../forrest.build.xml:403:
Project already has content

> I started from scratch and have the following problems:
> 
> - I copied the Forrest howto directory in my project directory (I know 
> that I have problems with the howtos so I wanted to start with something 
> that worked).  I modify the tabs.xml with:
> 
>         <tab label="How-Tos" dir="howto/"/>
> 
> when the mouse goes over the link (in the index.html file), I can see 
> "http://localhost:8080/Xindice-documentation/howto/" but when I click on 
> the link the browser lands at "http://localhost:8080/howto/index.html" 
> and since the "Xindice-documentation" is missing, I have a "not found 
> resource".

The Forrest webapp has the same problem :/  I thought I fixed it long
ago.. will have a look.

> - When I add "Xindice-documentation" I can successfully see the pages 
> but their content is empty.  The first page is ok (index.html) but the 
> individual how-tos are empty (the border, menus are ok but not the 
> content).  I already had problems with how-tos and taking the one from 
> Forrest unfortunately doesn't help.
> 
> - When I copied them into "xdocs/community/howto"... it works!

Short answer: I just fixed the default sitemap to allow '*howto' directories
anywhere.  Eg /howto, /foo/howto, /foo-howto.  Only community/howto is treated
specially, with revisions.  I hope this behaviour meets the majority of
use-cases.  It's done by adding this rule:

<!-- Any other howto directories get transformed, without revisions -->
<map:match pattern="body-**howto/*.xml">
  <map:generate src="content/xdocs/{1}howto/{2}.xml"/>
  <map:transform src="library/xslt/howto2document.xsl" label="content"/>
  <map:call resource="skinit">
    <map:parameter name="type" value="document2html"/>
    <map:parameter name="resource" value="{3}"/>
    <map:parameter name="dir" value="{1}howto/"/>
  </map:call>
</map:match>

and tweaking howto2document.xsl to allow XMLs without revisions.


Long answer:

The default sitemap has this rule:

 <map:match pattern="body-community/*/*/**.xml">
   ...
     <map:part src="content/xdocs/community/{1}/{2}/{3}.xml"/>
   ...
   <map:transform src="library/xslt/{1}2document.xsl" label="content"/>
   ...
 </map:match>

So only community/howto/*/*.xml files are treated as 'howto's.

In the long term, we intend to fix this with content-aware pipelines (CAPs),
which infer the document type by examining the DOCTYPE declaration (and other
stuff).  CAPs are implemented but not integrated into the sitemap, so for now,
a special sitemap rule needs to be added, as documented at:

http://xml.apache.org/forrest/your-project.html#N10132

(which I've just done)

> I let work on this one for the moment...
> 
> -Vladimir
> 
> PS: good job but unfortunately not ready to be used by everyone.  You 
> still need a lot of patience...

Yes, Forrest inherits Cocoon's ability to be infuriating ;)

--Jeff

> Vladimir R. Bossicard
> www.bossicard.com