forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: Problems with unified source directory
Date Fri, 15 Nov 2002 10:14:44 GMT


Jeff Turner wrote:
> 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:
> 
> forrest.validate.xdocs.includes=*.x*
> forrest.validate.xdocs.excludes=
> 
> So how about using the same system for limiting what the xdocs-dir
> contains:
> 
> forrest.xdocs-dir.includes = **/*.xml
> forrest.xdocs-dir.excludes = images/**
> 
> 
> So forrest.properties 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"
>            includes="{layout:xdocs-dir/includes}"
>            excludes="{layout:xdocs-dir/excludes}"
>    <map:generate src="{layout:xdocs-dir}/{0}"/>
>    ...
> </map:match>
> 
> That could be implemented with an XMLModule (hence {layout:..} syntax)
> and a forrest.properties replacement looking like this:
> 
> <forrest-layout dir="src/documentation/content">
> 
>   <images-dir dir="images">
>     <include name="*.*"/>
>     <exclude name=""/>
>   </images-dir>
> 
>   <xdocs-dir dir="">
>     <include name="**/*.xml"/>
>     <exclude name="${images-dir}"/>
>   </xdocs-dir>
> 
> </forrest-layout>
> 
> 
> 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.

Ok, very clear.
I'll wait then for the more complete proposal mail, I was not really 
that aware of all the ramifications of coming up with a quick fix, that 
would do more harm than good.

Just for a reminder (release-release-release first :-), this is the 
scenario I would like, so you can already post the thoughts also 
commenting on this:

  1) we categorize the sources (images, xdocs, etc)
  2) each category location(s) can be defined with includes and excludes
  3) default behaviour is having a mixed content dir for the 
least-surprise principle and a separate one with all categories 
separated for maximum content-type separation; the unified one takes 
precedence on the separated ones.

No need to reply now, get on with the release, we'll discuss this later :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message