cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerald Aichholzer <>
Subject Re: XMLFileModule for a dynamic file.
Date Wed, 01 Jun 2005 14:19:37 GMT
Hello Alexander,

Alexander Berezhnoy wrote:
> 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 have had similar problems last week and have solved it with an
aggregator. A simplified version of my pipeline looks like this:

   <map:pipeline match="myapp/*/info.xml">

     <map:aggregate element="document">
       <map:part src="cocoon:/myapp/data/data.xml"/>
       <map:part src="cocoon:/myapp/data/data-{1}.xml"/>

     <map:transform type="xslt" src="cocoon:/stylesheets/info.xsl"/>

     <map:serialize type="xml"/>

The pipeline's first stage aggregates the base data with the xml file
(in my case its name is determined by the matcher). The result looks
like the following:

     <!-- content of data.xml here -->
     <!-- content of data-{1}.xml here -->

The next step is the transformation. For the stylesheet it looks like
everything is in one file (although in reality the content is generated
dynamically depending on the URI).

I can't say if my approach meets your requirements, too, but it fits
my needs perfectly.


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

View raw message