cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: [C2]Access control using sitemap
Date Sun, 10 Sep 2000 20:12:43 GMT
Zvi wrote:
> 
> Hi,
> 
> Stefano Mazzocchi wrote:
> 
> [skipped]
> 
> > > Aggregation means the method through which multiple pipelines are merged to
> > > produce 1 oupput. Currently cocoon has support for 1 pipeline producing
> > > multiple outputs but no support for multiple pipelines producing one
> > > output. (thou you can do it with certain hacks and perhaps via XInclude -
> > > it is not easy).
> >
> > ???
> >
> > Do you seriously think that something like this
> >
> >  <page>
> >   <sitebar xinclude:href="/sitebar"/>
> >   <body>
> >    blah blah
> >   </body>
> >  </page>
> >
> > is too hard to use?
> 
> not so hard, but it's on the individual page level, in my app I need take the XML
> fragment of sidebar and transform it with XSLT and only then iclude into document.
> Especially highly needed, ability to programmaticaly call XSPs, i.e. include XSP
> inside other XSP without internal HTTP requests. I think better to do that at
> sitemap level, example:
> 
>   <match type="uri" pattern="myapp/**">
>         <vaiable name="sitebar">
>           <generate src="myapp/sitebar.xml"/>
>           <transform src="myapp/sitebar.xsl"/>
>         </variable>
>         <vaiable name="footer">
>           <generate src="myapp/footer.xml"/>
>           <transform src="myapp/footer.xsl"/>
>         </variable>
>         <generate src="myapp/page.xml">
>             <param name="sitebar" value="$sitebar"/>
>             <param name="footer" value="$footer"/>
>          </generate>
>         <transform src="myapp/page.xsl"/>
>          <serialize type="html"/>
>   </match>
> 
> In short we need aggregation on the sitemap level and not only on the individual XSP
> page level.

Is it so hard to write a simple transformer that does this???

  <match type="uri" pattern="myapp/**">
    <generate src="myapp/page.xml">
    <transform type="my-include" src="myapp/sitebar.xml">
      <param name="stylesheet" value="myapp/sitebar.xsl"/>
      <param name="position" value="left"/>
    </transform>
    <transform type="my-include" src="myapp/footer.xml">
      <param name="stylesheet" value="myapp/footer.xsl"/>
      <param name="position" value="bottom"/>
    </transform>
    <transform src="myapp/page.xsl"/>
    <serialize type="html"/>
  </match>

IMHO its totally easy to write such a "my-include" transformer, don't
you think? And you can easily read it top down.

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1  856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1  856 2201
Hintereichenstrasse 7                     Mobil: +41 (0)78 759 7703 
CH-8166 Niederweningen                    Mailto:Giacomo.Pati@pwr.ch 
                                          Web:   http://www.pwr.ch

Mime
View raw message