forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: directory/menu structure
Date Wed, 02 Apr 2003 02:34:03 GMT
On Tue, Apr 01, 2003 at 12:01:55PM -0700, Victor Mote wrote:
> I am working on trying to get the fop tabs & left menus cleaned up. We have
> documents in the following directories that I would like to appear on one
> logical menu:
>     design
>     design/understanding
> 
> I have removed design/understanding/book.xml, and placed the related entries
> into design/book.xml as follows:
> 
>     <menu label="About">
>       <menu-item label="Index" href="index.html"/>
>     </menu>
>     <menu label="Understanding">
>       <menu-item label="Introduction" href="understanding/index.html"/>
>       <menu-item label="XML Parsing" href="understanding/xml_parsing.html"/>
>     ...
> 
> When I build the site locally, the html documents created in the
> "understanding" subdirectory all are "Cocoon 2 - Resource not Found"
> documents, with the "missing-file" listed as itself. For example,
> design/understanding/index.html has the following "missing-file":
>   /u/vic/fop/trunk/xml-fop/build/site/design/understanding/index.html
> 
> Interestingly, the related pdf files are all created properly.
> 
> Questions:
> 1. Is this expected behavior?
> 2. Is a book.xml file is required in each directory in order to get the
> directory contents generated?

Yes, every directory needs a book.xml, even if it is visually identical
to the book.xml of the parent directory.  book.xml's don't inherit.  The
options are:
 - use one site.xml file in content/xdocs/
 - use a book.xml file in each directory
 - use one site.xml file, and override specific directories with book.xml
   files.

> 3. Would using site.xml give us more flexibility here?

It may give the illusion of greater flexibility :) Internally, site.xml
is converted to book.xml syntax on the fly, so they are technically
equivalent.  Using site.xml would remove the need for a book.xml per
directory.

> 4. Is there a sample of site.xml somewhere? I don't see one on the forrest
> site.

Forrest has a src/documentation/content/xdocs/site.xml, and running
'forrest site' should generate a site using one.

> 5. Jeff has already explained to me that the tab selection is tied to the
> document location, and it looks like the menu is also (depending on answers
> to above). Is it the intent of Forrest to be so hardwired to the directory
> structure? Are there future plans to make this more flexible?

The default sitemap does map the URI space directly onto the filesystem
structure, but in principle, the Cocoon sitemap can do anything you want
it to.  In CVS Forrest, it is pretty trivial to create 'virtual'
directories: just add a 'virtualdir/**.xml' matcher serving the
appropriate content.

As for menus, does site.xml offer enough flexibility?


--Jeff


Mime
View raw message