cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <pati_giac...@yahoo.com>
Subject Re: [C2]Access control using sitemap
Date Tue, 12 Sep 2000 13:33:57 GMT

--- Zvi <thezvi@ifrance.com> wrote:
> Hi Giacomo,
> 
> Giacomo Pati wrote:
> 
> > Zvi wrote:
> > >
> > > skipped...
> > >
> > > 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.
> 
> Can you explain how this work? 

It works exactly like your example :)

> Is that real C2 sitemap example?

Yes, only the param element is called parameter in C2.

> In my example I need 2 xsp's transformed, before inclusion in another
> XSP document - and
> in your example you include them on the transformation stage.
> And this is not the same thing.

I've never said that the "my-include" transformer doesn't use xsp to
get the xml from its src= attribute? It totally depends on the
implementation of that transformer.

> What I don't like in C2 sitemap, that there is many things hidden, to
> reduce verbosity,
> but I think it's also reduce redability. What for example happend
> with results of two
> intermidiate transforms, how can I understand from this sitemap them
> going to be included
> into resulting document?

Mime
View raw message