You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by TREGAN Fabien <fa...@airbus.com> on 2002/04/26 16:14:37 UTC

AbstractSAXSource constructor

In AbstractSAXSource.java :


    public AbstractSAXSource(Environment environment,
                       ComponentManager manager,
                       Logger logger) {
      this.log = logger;
      this.manager = manager;

    }

Is there a reason to have environnement as a parameter ? 

fabien.

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


Re: AbstractSAXSource constructor

Posted by Michael Hartle <mh...@hartle-klug.com>.
Carsten Ziegeler wrote:

>Michael Hartle wrote:
>  
>
>>Can you give some pointer on what the differences between "classical" 
>>Sources and Avalon Excalibur Source objects are ?
>>
>Ok, first of course the package name :)
>
<snip-overview/>

Thanks !

Best regards,

Michael Hartle,
Hartle & Klug GbR



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


RE: AbstractSAXSource constructor

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
I just wanted to add, that I will try to keep updated information
on my newly created weblog (http://radio.weblogs.com/0107211/).

(ok, I'm only trying to top Matthews hit rate... :) )


Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.s-und-n.de                      mailto: cziegeler@s-und-n.de
Visit my new Weblog:           http://radio.weblogs.com/0107211/
================================================================


> -----Original Message-----
> From: Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> Sent: Friday, April 26, 2002 5:35 PM
> To: cocoon-dev@xml.apache.org
> Subject: RE: AbstractSAXSource constructor
>
>
> Michael Hartle wrote:
> > Can you give some pointer on what the differences between "classical"
> > Sources and Avalon Excalibur Source objects are ?
> >
> Ok, first of course the package name :)
>
> Seriously, the main difference is that the Cocoon Source object is
> XMLizable, that means it can directly send SAX events.
>
> The AE Source object is not XMLizable, which is more correct as a
> protocol only describes the way of transport but not the format
> of the data which is transfered. Therefore it provides a getMimeType()
> method.
>
> Caching: The Cocoon Source object returns a last modified time
> stamp which is very limiting. For example a source could have an
> expires date or something like that.
> The AE Source returns a validity object which is capable of all
> these validity checkings. So the information used for validity
> checking is provided by the source object and not maintained
> by the client of the source as it is currently in Cocoon.
>
> These are the main differences.
>
> As we in Cocoonland are dealing a lot with XML, a Source implementation
> can still implement the XMLizable Interface (from AE and not from Cocoon!)
> to directly provide SAX events. The Cocoon SourceResolver (in the
> environment package) has a new method toSAX() which gets a Source
> object and tests it if it implements the XMLizable interface.
> If not the new AE XMLizer is used which is a component that can
> convert an input stream with a given mime-type to SAX events. This
> component is configurable and extensible.
>
>
> Carsten
>
> Open Source Group                        sunShine - b:Integrated
> ================================================================
> Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> www.s-und-n.de                      mailto: cziegeler@s-und-n.de
> Visit my new Weblog:           http://radio.weblogs.com/0107211/
> ================================================================
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


RE: AbstractSAXSource constructor

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Michael Hartle wrote:
> Can you give some pointer on what the differences between "classical" 
> Sources and Avalon Excalibur Source objects are ?
> 
Ok, first of course the package name :)

Seriously, the main difference is that the Cocoon Source object is
XMLizable, that means it can directly send SAX events.

The AE Source object is not XMLizable, which is more correct as a
protocol only describes the way of transport but not the format
of the data which is transfered. Therefore it provides a getMimeType()
method.

Caching: The Cocoon Source object returns a last modified time
stamp which is very limiting. For example a source could have an
expires date or something like that.
The AE Source returns a validity object which is capable of all
these validity checkings. So the information used for validity
checking is provided by the source object and not maintained
by the client of the source as it is currently in Cocoon.

These are the main differences.

As we in Cocoonland are dealing a lot with XML, a Source implementation
can still implement the XMLizable Interface (from AE and not from Cocoon!)
to directly provide SAX events. The Cocoon SourceResolver (in the
environment package) has a new method toSAX() which gets a Source
object and tests it if it implements the XMLizable interface. 
If not the new AE XMLizer is used which is a component that can 
convert an input stream with a given mime-type to SAX events. This
component is configurable and extensible.


Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.s-und-n.de                      mailto: cziegeler@s-und-n.de 
Visit my new Weblog:           http://radio.weblogs.com/0107211/
================================================================


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


Re: AbstractSAXSource constructor

Posted by Michael Hartle <mh...@hartle-klug.com>.
Carsten Ziegeler wrote:

>Gianugo Rabellino wrote:
>  
>
>>Definitely not. It was an oversight: the problem is that fixing it might 
>>break some components. I'll take a look at it.
>>
>>    
>>
>And you could rewrite them as avalon excalibur source objects... :)
>
Can you give some pointer on what the differences between "classical" 
Sources and Avalon Excalibur Source objects are ?

>Carsten
>
Best regards,

Michael Hartle,
Hartle & Klug GbR


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


RE: AbstractSAXSource constructor

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Gianugo Rabellino wrote:
> 
> TREGAN Fabien wrote:
> > In AbstractSAXSource.java :
> > 
> > 
> >     public AbstractSAXSource(Environment environment,
> >                        ComponentManager manager,
> >                        Logger logger) {
> >       this.log = logger;
> >       this.manager = manager;
> > 
> >     }
> > 
> > Is there a reason to have environnement as a parameter ? 
> 
> Definitely not. It was an oversight: the problem is that fixing it might 
> break some components. I'll take a look at it.
> 
And you could rewrite them as avalon excalibur source objects... :)

Carsten


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


Re: AbstractSAXSource constructor

Posted by Gianugo Rabellino <gi...@apache.org>.
TREGAN Fabien wrote:
> In AbstractSAXSource.java :
> 
> 
>     public AbstractSAXSource(Environment environment,
>                        ComponentManager manager,
>                        Logger logger) {
>       this.log = logger;
>       this.manager = manager;
> 
>     }
> 
> Is there a reason to have environnement as a parameter ? 

Definitely not. It was an oversight: the problem is that fixing it might 
break some components. I'll take a look at it.

Ciao,

-- 
Gianugo Rabellino


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