forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: Problems with unified source directory
Date Fri, 15 Nov 2002 10:09:54 GMT
On Fri, Nov 15, 2002 at 09:12:13AM +0100, Nicola Ken Barozzi wrote:
> I've converted the Avalon Phoenix site to Forrest, and I'm trying a 
> unified dir structure, with all xdocs in src/documentation/content and 
> images in src/documentation/content/images.
> I changed the two properties accordingly, and while the xdocs render 
> fine in both CLI and, the images are crawled by the CLI as html files 
> (header.gif.html) and not rendered.

Approaching the problem from the user's perspective..

For validation, we have a system of associating an includes and excludes
pattern with each directory:


So how about using the same system for limiting what the xdocs-dir

forrest.xdocs-dir.includes = **/*.xml
forrest.xdocs-dir.excludes = images/**

So for phoenix would be:

forrest.xdocs-dir = src/documentation/content
forrest.xdocs-dir.excludes = images/**
forrest.images-dir = src/documentation/content/images

Then we have a parametrized sitemap entry which uses the includes and
excludes, so that matchers only exist for valid transformations.

<map:match type="AntMatcher"
   <map:generate src="{layout:xdocs-dir}/{0}"/>

That could be implemented with an XMLModule (hence {layout:..} syntax)
and a replacement looking like this:

<forrest-layout dir="src/documentation/content">

  <images-dir dir="images">
    <include name="*.*"/>
    <exclude name=""/>

  <xdocs-dir dir="">
    <include name="**/*.xml"/>
    <exclude name="${images-dir}"/>


As you can see I'm making stuff up as I go.. a more coherent version of
this was intended to be the topic of a "Proposed Forrest Roadmap" email.
The only thing worth salvaging from this is that the current system _can_
be evolved to support use-cases like mixed content, without turning the
sitemap into a try-handle-anything mess.


View raw message