Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 68028 invoked from network); 30 Aug 2005 21:21:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Aug 2005 21:21:53 -0000 Received: (qmail 76451 invoked by uid 500); 30 Aug 2005 21:21:46 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 76379 invoked by uid 500); 30 Aug 2005 21:21:46 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 76321 invoked by uid 99); 30 Aug 2005 21:21:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2005 14:21:45 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of joerg.heinicke@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 30 Aug 2005 14:22:01 -0700 Received: (qmail invoked by alias); 30 Aug 2005 21:21:43 -0000 Received: from p549D3FB1.dip0.t-ipconnect.de (EHLO [192.168.122.254]) [84.157.63.177] by mail.gmx.net (mp034) with SMTP; 30 Aug 2005 23:21:43 +0200 X-Authenticated: #3483660 Message-ID: <4314CDE5.9010802@gmx.de> Date: Tue, 30 Aug 2005 23:21:41 +0200 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.11) Gecko/20050728 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: directory generator depth 2 (sort + regexp) References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 30.08.2005 11:57, Reinhard Haller wrote: > Hi, > > I want to collect a set of the newest news snippets out of > a nested directory structure like > > maindir --+--subdir1--+--file1.xml > | +--file2.xml > +--subdir2-----file3.xml > +--subdir3--+--file4.xml > +--file5.xml > > the pipeline match > > > > > > > > > > > > > > doesn't work. The problem is that the directory structure is hierarchical while the regexp is flat. The regexps are used on every level of the hierarchy, i.e. subdir{n} does not match on .xml, so it is not included. > If the regexp is changed to > > value="(^(subdir1|subdir2|subdir3)$|\.xml$)" /> > > I've got the desired files, but the sorting is done with the subdir > modified > as first key and the file modified as second key. It is still a hierarchy, the different levels are sorted individually. > I've two questions: > > a) is there a regexp working without the explicit knowledge of the > subdirs? Unfortunately not. > b) is there a way to get the desired sort based only on the modified > file date? It should be simple with an XSLT processing afterwards. The whole problem is your understanding of the matching vs. the working of the directory generator (which is not very intuitive). Long time ago there were suggestions to change the directory generator to be ant based, i.e. using the ant syntax. This would solve all your problems. Unfortunately nobody started with this change. Joerg --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org