cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Dynamic configuration of input modules, and the XMLFileModule
Date Wed, 03 May 2006 16:40:51 GMT

> >Think you can very easily solve your problems with a 
> LocationMapModule (and 
> >have the locationmap created dynamically from the number of 
> XML files you 
> >need). Look at forrest.
> 
> Is that LocationMapModule standard in Cocoon, or a Forrest 
> extension?  I 
> don't see any mention of it in the docs[1].

It used to be in cocoon, but now it is in Forrest (org.apache.forrest.locationmap.LocationMapModule).
http://cocoondev.org/daisyscratchpad/g1/280.html explains the idea more or less and its usage.


http://forrest.apache.org/

Regards Ard

-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
a.schrijvers@hippo.nl / http://www.hippo.nl
-------------------------------------------------------------- 

> 
> 
> Andrew.
> 
> [1] http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html
> 
> 
> >If you dont manage, let me know,
> >
> >Regards AS
> >--
> >
> >Hippo
> >Oosteinde 11
> >1017WT Amsterdam
> >The Netherlands
> >Tel  +31 (0)20 5224466
> >-------------------------------------------------------------
> >a.schrijvers@hippo.nl / http://www.hippo.nl
> >--------------------------------------------------------------
> >
> >
> > >
> > > In the Cocoon javadocs[1]  it says that input modules are
> > > passed a dynamic,
> > > per-request configuration which will usually override the static
> > > configuration from the cocoon.xconf.  However, neither the
> > > javadocs nor the
> > > Input Modules Reference[2] in the docs give any 
> indication of how you
> > > actually do this.  Is it talking about something you can 
> include in a
> > > pipeline, or somehow within the {foo:bar} string of a sitemap
> > > parameter/attribute?  Or is it simply talking about the
> > > <map:component-configurations> section of the pipeline?  If
> > > the latter, is
> > > it possible to include these within a pipeline matcher, 
> and use any
> > > available sitemap variables in the configured values?
> > >
> > > My suspicion is the "dynamic" configuration isn't as dynamic
> > > as I need.  I
> > > have a number of XML files (using the same DTD) and need to
> > > extract a value
> > > from one of them to pass into a map:redirect-to (which file
> > > to use being
> > > supplied as part of the request).  If I was using a single
> > > file, I think I
> > > could handle it with the XMLFileModule; judging from the
> > > URLEncode & decode
> > > input modules' docs, it's okay to nest input module 
> attributes (e.g.
> > > src="http://remote/page?param1={url-encode:{request-param:para
> > > m1}}"), so I
> > > reckon something along the lines of <map:redirect-to
> > > uri="{xmlfile:/document/link[@name='{../1}'/url}"/> would 
> work.  With
> > > separate files, I can just use {xmlfile:/document/link/url},
> > > but how do I
> > > specify for each request which file this is evaluated on?
> > >
> > > If the XMLFileModule can't be used in this way, I guess 
> I've got two
> > > options:
> > > - either write my own input module that takes an
> > > xinclude-like expression as
> > > the attribute
> > > ({myxmlfile:{1}.xml#xpointer(/document/link/url)}) specifying
> > > both the source file and jxpath
> > > - or, (since the XMLFileModule user docs say the XML can be
> > > obtained from
> > > any cocoon source) use the directory generator and c/xinclude
> > > transformer in
> > > a separate pipeline to combine all the files and configure
> > > the input module
> > > to use that pipeline as its "file".
> > > Or does anyone know of a better way?
> > >
> > >
> > > Andrew.
> > >
> > > [1] see under "Static/dynamic configuration" in
> > > http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/compone
> >nts/modules/input/package-summary.html
> >[2] http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message