cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: Aggregation of xml in a directory
Date Sun, 13 Oct 2002 06:24:56 GMT
On Sat, Oct 12, 2002 at 02:08:16PM +0100, Alex McLintock wrote:
> Hi folks,
> I am trying to figure out how to get Cocoon to display all the xml files in 
> a directory without being explicitly told each of their names in the 
> sitemap.

Have a look at the XPathDirectoryGenerator in the scratchpad. With it,
you can generate a directory listing, with a node extracted from each
file. Eg, I used it to extract <description> elements from a list of Ant

The relevant config was:

<map:sitemap ..
  <map:components ..
    <map:generators ..
      <map:generator  name="xpathdirectory"

  <!-- examples/index.html, listing all scripts -->
  <map:match pattern="examples/index.xml">
    <map:generate type="xpathdirectory"
    <map:serialize type="xml"/>


> I guess I need a combination of the Directory Generator and the Aggregation 
> tools.
> I am not too worried about the order of the files otherwise I would have to 
> use an XML database - which I would like to avoid if possible.
> PS I have looked in the Langham/Ziegeler book but can't find anything 
> useful.
> Do I need to write a DirectoryAggregation Generator in Java? perhaps others 
> would find it useful too.
> Alex

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message