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 Tue, 12 Sep 2000 16:02:06 GMT
Hi Zvi

Zvi wrote:
> 
> 1. Do we agree that there is need to implement aggregation on the sitemap
> level and not only on the individual XSP page level?

I don't see that for now and thus would say -0. 

> 2. I think that the XML Document Fragment "variable" is the "must have"
> concept for C2 sitemap, and it's not increasing FS, as other things people
> talking about, on this list. Otherwise I don't see clear way to have
> pipelines with multiple sources.

-1. I still don't see the need for it but if someone gives me a
enlighting example I might change my mind :)

> 3. I still don't understand your example, is there stack of results of
> intermidiate transforms, that following pipiline components have access to?

A Transformer has access to the pipeline in two sense (because of the
Transformer interface). 

1. It is a XMLConsumer and thus implements the ContentHandler interface.
This
   allows it to interpret the SAX event stream to catch events it is
   interesting in.
2. It is a XMLProducer and thus knows the ContentHandler it has to
deliver or
   forward SAX events to.

By knowing these two things a Transformer is able to catch the SAX event
it needs (ie. an element specified in a sitemap Parameter for this
Transformer, left and bottom in my example). At this point it can switch
its input stream of SAX events to another SAX source (the SAX events
produced from the src= attribute in my example using a parser to read a
xml document or using the XSP engine to produce a SAX stream from an XSP
page) by simply saying myNewSAXSource.setContentHandler(this)). After
this source has finished streaming SAX events by catching the
endDocument() event the my-include transformer can continue passing SAX
events from it original input source on to its ContentHandler. The
initial chaining of XMLProducers and XMLConsumers is done by the sitemap
engine when it has found a pipeline whic produces the requested
resource.

> Giacomo Pati wrote:
> 
> > --- Zvi <thezvi@ifrance.com> wrote:
> > > Hi Giacomo,
> > >
> > > Giacomo Pati wrote:
> > >
> > > > 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>
> > > >

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