forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Williams" <william...@gmail.com>
Subject Re: Which pipeline to intercept for Search
Date Fri, 17 Mar 2006 12:23:21 GMT
On 3/17/06, Ferdinand Soethe <ferdinand@apache.org> wrote:
>
> I've build a JS-based title search mechanism that works for Forrest in
> dynamic and static mode. It requires a page with a list of all page titles
> of the current site which in my application is generated outside of
> Forrest.
>
> Now I would like to make Forrest 0.7 build this list. What would be the
> pipeline to intercept or add if I want to run a transformation on each
> page extracting title and URL and write it in to a single page?
>
> Thanks for your help,
>
> --
> Ferdinand Soethe

Maybe you could use the XPathDirectoryGenerator to do it for you? 
You'll have to peice the URL back together but it's easy enough.

Something like:
    <map:match pattern="title-list.xml">
      <map:generate type="xpathdirectory" src="{project:content.xdocs}">
         <map:parameter name="depth" value="99"/>
         <map:parameter name="xpath" value="/document/header/title"/>
         <map:parameter name="sort" value="lastmodified"/>
         <map:parameter name="reverse" value="true"/>
      </map:generate>
      <map:serialize type="xml"/>
    </map:match>

--tim

Mime
View raw message