Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 58689 invoked from network); 1 Jul 2005 08:27:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jul 2005 08:27:14 -0000 Received: (qmail 72344 invoked by uid 500); 1 Jul 2005 08:27:09 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 72268 invoked by uid 500); 1 Jul 2005 08:27:08 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 72255 invoked by uid 99); 1 Jul 2005 08:27:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2005 01:27:08 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ap-cocoon-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2005 01:27:10 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DoGjs-0007sQ-33 for dev@cocoon.apache.org; Fri, 01 Jul 2005 10:19:08 +0200 Received: from c-67-171-172-83.hsd1.or.comcast.net ([67.171.172.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jul 2005 10:19:08 +0200 Received: from mlundquist2 by c-67-171-172-83.hsd1.or.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Jul 2005 10:19:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org From: Mark Lundquist Subject: Re: XMLFileModule for a dynamic file. Date: Fri, 1 Jul 2005 01:26:27 -0700 Lines: 40 Message-ID: References: <000701c566ab$83e80970$a903010a@shaolin> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-67-171-172-83.hsd1.or.comcast.net User-Agent: Unison/1.6.2 Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 2005-06-01 06:11:24 -0700, "Alexander Berezhnoy" (on users@cocoon.apache.org) said: > Dear friends, > I've been looking for this feature for a week already, nobody and nowhere > can't give me a definite answer. > > I want to extract data with XPath from an XML file whoes name depends on > request parameters. > The XMLFileModule is statically configured, so the file name is fixed. > > Please, is it possible without writing my own module? I ran across this thread today, because I need exactly this very same thing! :-) Alexander, I saw another post of yours around the same time, maybe on the dev group or somewhere... I too was faked out a little bit by the mention of "dynamic" configuration" in the comments for XMLFileModule. It looks like that stuff (the modConf parameter to getAttribute() and friends) is there for use by other Cocoon components... see LinkRewriterTransformer for an example. If you think about it, for what you wanted (and what I want :-), the only way to specify the source name would have to be in the attribute name syntax for the module. If you don't see it there, then it ain't there and this module doesn't do what we want :-/. So, what I'm after would be an XPathModule, invoked in the sitemap like this: {xpath:source-uri#xpath-expression} e.g. (in the particular appl'n I have for this just now :-): It looks like a reasonable strategy would be to factor most of XMLFileModule into a new class AbstractXMLFileModule, and then extend this to implement XPathModule. Comments? —ml—