You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Christian Zoffoli <cz...@xmerlin.org> on 2002/04/16 18:14:15 UTC

Re: execute scheduled commands in the sitemap

Vadim Gritsenko wrote:
> 
> > From: root [mailto:root] On Behalf Of Christian Zoffoli
> >
> >
> > Hi to all.
> > A little strange question... Is it possible to execute scheduled
> > commands in the sitemap ?
> 
> No. You want this for (say) periodic PDF reports generation, isn't it?
> 

I want periodically update an xml-db with some infos extracted by web
pages (found on internet).

es:
www.pincopalla.it/meteo.html --> meteo.xsl --> update db stored into
xindice  (on every 6:00)


...In your opinion, what kind of component I have to write ?


Thanks,
	Christian

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


Re: execute scheduled commands in the sitemap

Posted by Christian Zoffoli <cz...@xmerlin.org>.
Marcus Crafter wrote:
> 
> On Tue, Apr 16, 2002 at 06:14:15PM +0200, Christian Zoffoli wrote:
> >
> > I want periodically update an xml-db with some infos extracted by web
> > pages (found on internet).
> >
> > es:
> > www.pincopalla.it/meteo.html --> meteo.xsl --> update db stored into
> > xindice  (on every 6:00)
> 
>         You could do this by using the command line interface to cocoon
>         or something like wget, in combination with a cron facility.
> 
>         Cheers,
> 
>         Marcus

I know this way ...but on the target host I have no access to the cron
entries :(


Thanks for your answer,
		Christian

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


Re: execute scheduled commands in the sitemap

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
On Tue, Apr 16, 2002 at 06:14:15PM +0200, Christian Zoffoli wrote:
> 
> I want periodically update an xml-db with some infos extracted by web
> pages (found on internet).
> 
> es:
> www.pincopalla.it/meteo.html --> meteo.xsl --> update db stored into
> xindice  (on every 6:00)

	You could do this by using the command line interface to cocoon
	or something like wget, in combination with a cron facility.
	
	Cheers,
	
	Marcus


-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:

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


Re: execute scheduled commands in the sitemap

Posted by Christian Zoffoli <cz...@xmerlin.org>.
Vadim Gritsenko wrote:
> 
> > From: root [mailto:root] On Behalf Of Christian Zoffoli
> >
> > Vadim Gritsenko wrote:
> > >
> > > > From: root [mailto:root] On Behalf Of Christian Zoffoli
> > > >
> > > >
> > > > Hi to all.
> > > > A little strange question... Is it possible to execute scheduled
> > > > commands in the sitemap ?
> > >
> > > No. You want this for (say) periodic PDF reports generation, isn't
> it?
> > >
> >
> > I want periodically update an xml-db with some infos extracted by web
> > pages (found on internet).
> >
> > es:
> > www.pincopalla.it/meteo.html --> meteo.xsl --> update db stored into
> > xindice  (on every 6:00)
> >
> >
> > ...In your opinion, what kind of component I have to write ?
> 
> In Avalon (IIRC) there is some infrastructure to execute asynchronous
> commands. I would try and implement "cron" component based on this
> infrastructure, and then I would write CrawlCommand (see
> search/create-index.xsp) and schedule it using this component at 6. This
> CrawlCommand will be capable of invoking any Cocoon pipeline, where you
> can go fetch data and put it into XML:DB. Sounds good?
> 
> Vadim
> 

It sounds extremely good :))  thank you very much.

Christian

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


Re: [PROPOSAL] Add getMimeType() to the Source interface

Posted by Anatoly Sennov <a_...@softhome.net>.
Hello Per-Olof,

 PON> Just curious, is this integration work aimed to be donated back to
 PON> apache once completed?
If the Cocoon community will not have objections to it :-)

--Anatoly Sennov
k2s ltd


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


Re: [PROPOSAL] Add getMimeType() to the Source interface

Posted by Per-Olof Norén <pe...@alma.nu>.
Hi anatoly,
Just curious, is this integration work aimed to be donated back to apache
once completed?
This would IMO really boost cocoon´s power. Being able to construct cms-type
solutions with
slide as backend. Saving content is done through webdav and so on. I think
Stefano is also looking
into webdav for cocoon, btw.

Regards
Per-Olof Norén


----- Original Message -----
From: "Anatoly Sennov" <a_...@softhome.net>
To: <co...@xml.apache.org>
Sent: Thursday, April 18, 2002 12:19 PM
Subject: [PROPOSAL] Add getMimeType() to the Source interface


> Hello,
>
> Currently I'm integrating Cocoon and Slide and I think that it's not
correct
> to determine the Mime-Type from the servlet context when the Source itself
> might know it better. The proposed changes:
>
> 1. Add
>     public String getMimeType();
> to the Source interface
>
> 2. Default implementation may just return null
>
> 3. Change the ResourceReader and other places where the source's Mime-Type
> is needed, for example the ResourceReader.getMimeType() might look like:
>
> public String getMimeType() {
>     String mtype = this.source.getMimeType();
>     if(mtype != null)
>       return mtype;
>    Context ctx = ObjectModelHelper.getContext(this.objectModel);
>    if(ctx != null)
>       return ctx.getMimeType(this.source);
>    return null;
> }
>
> --Anatoly Sennov
> k2s ltd
>
>
> ---------------------------------------------------------------------
> 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: [PROPOSAL] Add getMimeType() to the Source interface

Posted by Anatoly Sennov <a_...@softhome.net>.
Hello Carsten,

 CZ> adding the getMimeType() method is a good idea, but..

 CZ> the source resolving as it exists today will soon be replaced with
 CZ> the source resolving from avalon excalibur (I hope by next week).

 CZ> The source resolving of excalibur will have the getMimeType()
 CZ> feature, so stay tuned.
Ok.
For now, I've implemented the proposed functionality locally so I can write
code while waiting for the new source resolver :-)

 CZ> Carsten

--Anatoly Sennov
k2s ltd


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


RE: [PROPOSAL] Add getMimeType() to the Source interface

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Hi Anatoly,

adding the getMimeType() method is a good idea, but..

the source resolving as it exists today will soon be replaced with the
source resolving from avalon excalibur (I hope by next week).

The source resolving of excalibur will have the getMimeType() feature,
so stay tuned.

Carsten

Anatoly Sennov wrote:
>
> Hello,
>
> Currently I'm integrating Cocoon and Slide and I think that it's
> not correct
> to determine the Mime-Type from the servlet context when the Source itself
> might know it better. The proposed changes:
>
> 1. Add
>     public String getMimeType();
> to the Source interface
>
> 2. Default implementation may just return null
>
> 3. Change the ResourceReader and other places where the source's Mime-Type
> is needed, for example the ResourceReader.getMimeType() might look like:
>
> public String getMimeType() {
>     String mtype = this.source.getMimeType();
>     if(mtype != null)
>       return mtype;
>    Context ctx = ObjectModelHelper.getContext(this.objectModel);
>    if(ctx != null)
>       return ctx.getMimeType(this.source);
>    return null;
> }
>
> --Anatoly Sennov
> k2s ltd
>
>
> ---------------------------------------------------------------------
> 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


[PROPOSAL] Add getMimeType() to the Source interface

Posted by Anatoly Sennov <a_...@softhome.net>.
Hello,

Currently I'm integrating Cocoon and Slide and I think that it's not correct
to determine the Mime-Type from the servlet context when the Source itself
might know it better. The proposed changes:

1. Add
    public String getMimeType();
to the Source interface

2. Default implementation may just return null

3. Change the ResourceReader and other places where the source's Mime-Type
is needed, for example the ResourceReader.getMimeType() might look like:

public String getMimeType() {
    String mtype = this.source.getMimeType();
    if(mtype != null)
      return mtype;
   Context ctx = ObjectModelHelper.getContext(this.objectModel);
   if(ctx != null)
      return ctx.getMimeType(this.source);
   return null;
}

--Anatoly Sennov
k2s ltd


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


RE: execute scheduled commands in the sitemap

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: root [mailto:root] On Behalf Of Christian Zoffoli
> 
> Vadim Gritsenko wrote:
> >
> > > From: root [mailto:root] On Behalf Of Christian Zoffoli
> > >
> > >
> > > Hi to all.
> > > A little strange question... Is it possible to execute scheduled
> > > commands in the sitemap ?
> >
> > No. You want this for (say) periodic PDF reports generation, isn't
it?
> >
> 
> I want periodically update an xml-db with some infos extracted by web
> pages (found on internet).
> 
> es:
> www.pincopalla.it/meteo.html --> meteo.xsl --> update db stored into
> xindice  (on every 6:00)
> 
> 
> ...In your opinion, what kind of component I have to write ?

In Avalon (IIRC) there is some infrastructure to execute asynchronous
commands. I would try and implement "cron" component based on this
infrastructure, and then I would write CrawlCommand (see
search/create-index.xsp) and schedule it using this component at 6. This
CrawlCommand will be capable of invoking any Cocoon pipeline, where you
can go fetch data and put it into XML:DB. Sounds good?

Vadim

> 
> 
> Thanks,
> 	Christian


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