forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: Here we go again
Date Sun, 27 Oct 2002 07:30:11 GMT
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


This project already has content in
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/"/>

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"/>

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:

(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 ;)


> Vladimir R. Bossicard

View raw message