cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhard Poetz" <reinh...@apache.org>
Subject RE: Conditional Aggregation?
Date Mon, 26 Jan 2004 19:28:31 GMT

From: Brent L Johnson

> I'm currently using map:aggregate to pull together
> multiple XSP's into a single source.  This works fine
> for all the "static" XSP content I want.  But what
> about conditional content?
> 
> I.e. Im writing a builtin google search.  I've got an
> XSP that does a SOAP call to pull the search results.
> But I do *not* want make that soap call if a search
> wasnt meant to be run.  Here is what Im trying to do:
> 
>  <map:aggregate element="data">
>      <map:part src="cocoon:/weather.xml"/>
>      <map:part src="cocoon:/feedsList.xsp"/>
>      <map:part src="cocoon:/emails.xsp"/>
>      <!--+
>          | Google Search
>          +-->
>      <map:select type="request-parameter">
>          <map:parameter name="parameter-name" value="search"/>
>          <map:when test="1">
>              <map:part src="cocoon:/google/search.xsp"/>
>          </map:when>
>      </map:select>
>  </map:aggregate>
>  
> This doesnt work because you cant have a map:select inside
> a map:aggregate.  But you probably get the point of what
> I'm trying to do.
> 
> Anyone have any suggestions?

Use XSP as generator and generate CInclude elements. Then use the
CInclude-transformer.

HTH
Reinhard


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


Mime
View raw message