cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: input module question
Date Tue, 28 Jan 2003 13:40:32 GMT
On 28.Jan.2003 -- 04:12 PM, Konstantin Piroumian wrote:
> From: "Jeremy Quinn" <jeremy@media.demon.co.uk>
> 
> > Hi All,
> >
> > I am interested in seeing whether Input Modules in the Sitemap can use
> > Sitemap params as their own params.
> >
> > I am looking at all the different ways to solve a problem .... before
> > we choose a solution
> >
> > Say I have a set of urls:
> >
> > /archive/people/ABC
> > <snip/>
> > /archive/people/WXYZ
> >
> > Which result in modifications to an SQL Query:
> >
> > WHERE surname LIKE 'A%' OR 'B%' OR 'C%'
> > <snip/>
> > WHERE surname LIKE 'W%' OR 'X%' OR 'Y%' OR 'Z%'
> >
> > Say I had an XML file, used by the XMLFileModule (mapped to
> > 'alphabet'), that mapped each (allowed) letter group to the query
> > modification it needed, then this could be passed by the sitemap to the
> > SQLTransformer via a map:parameter into a <substitute-value
> > sql:name="alphabet"/>.
> >
> > But is this possible?
> >
> > <map:match pattern="archive/(.*)/([A-Z]*)$" type="regexp">
> >    <map:generate src="{our:content}/archive/{1}.xml"/>
> >    <snip/>
> >    <map:transform type="sql">
> >      <map:parameter name="alphabet" value="{alphabet:{2}}"/>
> >    </map:transform>                                  ^^^      ????????
> >    <snip/>
> > </map:match>
> >
> > Is this possible to do?
> 
> Unfortunately no. I've raised this issue on dev list, but no one had a
> solution to it (I hope we'd invent something for that).

If we do that, we restrict the space of possible attributes so that
they may not contain curly brackets. Or we would need an escape
character. Not sure if this would be too restrictive.

Another solution would be to hold sitemap variables in a place where
they would be accessible to other components (e.g. objectModel?) and
have an module for this substitution.

Like

  <...... name="phonebook" src="o.a.c.c.m.i.ReplaceAttributeModule">
      <attribute-module name="sitemap"/>
      <value-module     name="xmlfile"/>
  </.........>

Thoughts?

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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


Mime
View raw message