cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [C2] Parameters to control Aggregation
Date Tue, 29 May 2001 19:43:36 GMT
On Tue, 29 May 2001, Peter Hargreaves wrote:

> OK, I'll explain.
>
> This is my 'menu.xsp' structure (it's xsp because I intend to add
> dynamic content later on):
>
> <xsp:page ...>
>   <menu>
>    <item longname="Cocoon" name="cocoon" default="sample">
>     ...
>     <item longname="Sample forms" name="sample" default="manage">
>      <item longname="Manage employees" name="manage">
>       <content src="forms/employee"/>
>      </item>
>      <item longname="Insert department" name="insdept">
>       <content src="forms/add-department"/>
>      </item>
>     </item>
>     ...
>    </item>
>   </menu>
> </xsp:page>
>
> When my user requests 'menu.xsp?select=cocoon/sample/manage'
> I would like to aggregate 'menu.xsp' (as above) with 'forms/employee'.
> When my user requests 'menu.xsp?select=cocoon/sample/insdept'
> I would like to aggregate 'menu.xsp' (as above) with 'forms/add-department'.

You should control aggregation in your sitemap not in your
programs/xsp. Why don't you do it the other way around?

  <map:match="menu-employee">
    <map:aggregate ...>
      <map:part src="menu"/>
      <map:part src="forms/employee"/>
    </map:aggregate>
  </map:match>

Giacomo

>
> I don't seem to be able to do this because aggregation doesn't provide a
> way for my first aggregated page to determine which is the second
> aggregated page. Or does it?
>
> If I use <cinclude:include ...> where I have <content...> in menu.xsp
> then I seem to get all the pages of my site included before my
> subsequent stylesheet removes the unwanted ones. Not an economic approach!
>
> If I use the sitemap approach to aggregation, I need to pass
> 'forms/add-department' from my first aggregated page (menu.xsp) to the
> sitemap so that it can be used as the second aggregated page.
>
> I hope the above helps for any enhancements to aggregation (removing the
> v), or have I missed something? Any comments/work-arounds on the above
> would be appreciated.
>
> Many thanks,
> Peter.
>
> P.S. I would also like to pass parameters from aggregated page to the
> next aggregated page.
>
> giacomo wrote:
>
> > On Mon, 28 May 2001, Peter Hargreaves wrote:
> >
> >> Hi Folks,
> >>
> >> I would like to aggregate two xsp sources where transformation of the
> >> first source determines the name of the second source. Is this possible,
> >> please?
> >
> >
> > Can you be more specific else I'd guess: no.
> >
> > Giacomo
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message